Skip to content

Commit 5531776

Browse files
committed
Fixed keyword parameters warning with Ruby 2.7
1 parent 3ac3d15 commit 5531776

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/daru/io/io.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def dataframe_write_csv dataframe, path, opts={}
103103
converters: :numeric
104104
}.merge(opts)
105105

106-
writer = ::CSV.open(path, 'w', options)
106+
writer = ::CSV.open(path, 'w', **options)
107107
writer << dataframe.vectors.to_a unless options[:headers] == false
108108

109109
dataframe.each_row do |row|
@@ -231,7 +231,7 @@ def from_csv_prepare_converters(converters)
231231
def from_csv_hash_with_headers(path, opts)
232232
opts[:header_converters] ||= :symbol
233233
::CSV
234-
.parse(open(path), opts)
234+
.parse(open(path), **opts)
235235
.tap { |c| yield c if block_given? }
236236
.by_col.map { |col_name, values| [col_name, values] }.to_h
237237
end

0 commit comments

Comments
 (0)