From 20f2063e678904ef34f1114a9d3bd4e71ab45a9c Mon Sep 17 00:00:00 2001 From: Adam Blinkinsop Date: Wed, 8 Apr 2020 13:52:48 -0700 Subject: [PATCH] Keyword arguments need ** (bare is deprecated) (#303) * Fix typos in the yaml documentation. * Fix keyword params deprecation warning. .../squib/lib/squib/api/data.rb:42: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /Users/blinks/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/csv.rb:679: warning: The called method `parse' is defined here --- lib/squib/api/data.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/squib/api/data.rb b/lib/squib/api/data.rb index a834c98..682eb2c 100644 --- a/lib/squib/api/data.rb +++ b/lib/squib/api/data.rb @@ -39,7 +39,7 @@ module Squib file = Args::InputFile.new(file: 'deck.csv').load!(opts).file[0] data = opts.key?(:data) ? opts[:data] : File.read(file) csv_opts = Args::CSV_Opts.new(opts) - table = CSV.parse(data, csv_opts.to_hash) + table = CSV.parse(data, **csv_opts.to_hash) check_duplicate_csv_headers(table) hash = Squib::DataFrame.new table.headers.each do |header|