diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-04-07 16:44:49 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2019-08-30 12:39:31 -0700 |
commit | d08e1004e0ee1286e4513de2a170391a4d0a0116 (patch) | |
tree | 5c7dd8244c2bf4c0f9b06725f3585c7ffc710ef3 /lib/csv | |
parent | 3f67fcd3d5ca5e2907790eb5bb16d03f5884ece8 (diff) | |
download | bundler-d08e1004e0ee1286e4513de2a170391a4d0a0116.tar.gz |
Fix keyword argument separation issues in lib
Mostly requires adding ** in either calls or method definitions.
Diffstat (limited to 'lib/csv')
-rw-r--r-- | lib/csv/core_ext/array.rb | 2 | ||||
-rw-r--r-- | lib/csv/core_ext/string.rb | 2 | ||||
-rw-r--r-- | lib/csv/row.rb | 2 | ||||
-rw-r--r-- | lib/csv/table.rb | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/csv/core_ext/array.rb b/lib/csv/core_ext/array.rb index 94df7d5c35..8beb06b082 100644 --- a/lib/csv/core_ext/array.rb +++ b/lib/csv/core_ext/array.rb @@ -4,6 +4,6 @@ class Array # :nodoc: # ["CSV", "data"].to_csv # #=> "CSV,data\n" def to_csv(**options) - CSV.generate_line(self, options) + CSV.generate_line(self, **options) end end diff --git a/lib/csv/core_ext/string.rb b/lib/csv/core_ext/string.rb index 8f2070f3bd..9b1d31c2a4 100644 --- a/lib/csv/core_ext/string.rb +++ b/lib/csv/core_ext/string.rb @@ -4,6 +4,6 @@ class String # :nodoc: # "CSV,data".parse_csv # #=> ["CSV", "data"] def parse_csv(**options) - CSV.parse_line(self, options) + CSV.parse_line(self, **options) end end diff --git a/lib/csv/row.rb b/lib/csv/row.rb index c79d75cd8a..1e1f27587b 100644 --- a/lib/csv/row.rb +++ b/lib/csv/row.rb @@ -345,7 +345,7 @@ class CSV # csv_row.fields.to_csv( options ) # def to_csv(**options) - fields.to_csv(options) + fields.to_csv(**options) end alias_method :to_s, :to_csv diff --git a/lib/csv/table.rb b/lib/csv/table.rb index 71eb885de5..29b188a6d7 100644 --- a/lib/csv/table.rb +++ b/lib/csv/table.rb @@ -367,9 +367,9 @@ class CSV # pass <tt>:write_headers => false</tt>. # def to_csv(write_headers: true, **options) - array = write_headers ? [headers.to_csv(options)] : [] + array = write_headers ? [headers.to_csv(**options)] : [] @table.each do |row| - array.push(row.fields.to_csv(options)) unless row.header_row? + array.push(row.fields.to_csv(**options)) unless row.header_row? end array.join("") |