Skip to content

Commit

Permalink
Fixed keyword parameters warning with Ruby 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
jonspalmer committed Jul 28, 2020
1 parent 3ac3d15 commit 5531776
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/daru/io/io.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def dataframe_write_csv dataframe, path, opts={}
converters: :numeric
}.merge(opts)

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

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

0 comments on commit 5531776

Please sign in to comment.