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
dev
Adam Blinkinsop 2020-04-08 13:52:48 -07:00 committed by GitHub
parent 7399946ec2
commit 20f2063e67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ module Squib
file = Args::InputFile.new(file: 'deck.csv').load!(opts).file[0] file = Args::InputFile.new(file: 'deck.csv').load!(opts).file[0]
data = opts.key?(:data) ? opts[:data] : File.read(file) data = opts.key?(:data) ? opts[:data] : File.read(file)
csv_opts = Args::CSV_Opts.new(opts) 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) check_duplicate_csv_headers(table)
hash = Squib::DataFrame.new hash = Squib::DataFrame.new
table.headers.each do |header| table.headers.each do |header|