Browse Source

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 6 years ago committed by GitHub
parent
commit
20f2063e67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      lib/squib/api/data.rb

2
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|

Loading…
Cancel
Save