From 55317768dd11de5cde636d3109f5c12a3cf14520 Mon Sep 17 00:00:00 2001 From: Jon Palmer <328224+jonspalmer@users.noreply.github.com> Date: Tue, 28 Jul 2020 10:09:48 -0400 Subject: [PATCH] Fixed keyword parameters warning with Ruby 2.7 --- lib/daru/io/io.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/daru/io/io.rb b/lib/daru/io/io.rb index 1555c5d79..d1ed5fcd1 100644 --- a/lib/daru/io/io.rb +++ b/lib/daru/io/io.rb @@ -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| @@ -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