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
This commit is contained in:
@@ -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|
|
||||||
|
|||||||
Reference in New Issue
Block a user