summaryrefslogtreecommitdiff
path: root/test/csv/test_encodings.rb
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-04-07 16:55:34 -0700
committerJeremy Evans <code@jeremyevans.net>2019-08-30 12:39:31 -0700
commite0b4599bba6bea744e0e90b7640dcc21d695c434 (patch)
tree50455545fbb97d90acb73e230177607c6b7b6f0a /test/csv/test_encodings.rb
parentd08e1004e0ee1286e4513de2a170391a4d0a0116 (diff)
Fix keyword argument separation warnings in test
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2395
Diffstat (limited to 'test/csv/test_encodings.rb')
-rwxr-xr-xtest/csv/test_encodings.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/csv/test_encodings.rb b/test/csv/test_encodings.rb
index 64ea36a..151ce70 100755
--- a/test/csv/test_encodings.rb
+++ b/test/csv/test_encodings.rb
@@ -273,19 +273,19 @@ class TestCSVEncodings < Test::Unit::TestCase
orig_fields = fields
fields = encode_ary(fields, encoding)
data = ary_to_data(fields, options)
- parsed = CSV.parse(data, options)
+ parsed = CSV.parse(data, **options)
assert_equal(fields, parsed)
parsed.flatten.each_with_index do |field, i|
assert_equal(encoding, field.encoding, "Field[#{i + 1}] was transcoded.")
end
File.open(@temp_csv_path, "wb") {|f| f.print(data)}
- CSV.open(@temp_csv_path, "rb:#{encoding}", options) do |csv|
+ CSV.open(@temp_csv_path, "rb:#{encoding}", **options) do |csv|
csv.each_with_index do |row, i|
assert_equal(fields[i], row)
end
end
begin
- CSV.open(@temp_csv_path, "rb:#{encoding}:#{__ENCODING__}", options) do |csv|
+ CSV.open(@temp_csv_path, "rb:#{encoding}:#{__ENCODING__}", **options) do |csv|
csv.each_with_index do |row, i|
assert_equal(orig_fields[i], row)
end
@@ -293,7 +293,7 @@ class TestCSVEncodings < Test::Unit::TestCase
rescue Encoding::ConverterNotFoundError
end
options[:encoding] = encoding.name
- CSV.open(@temp_csv_path, options) do |csv|
+ CSV.open(@temp_csv_path, **options) do |csv|
csv.each_with_index do |row, i|
assert_equal(fields[i], row)
end
@@ -302,7 +302,7 @@ class TestCSVEncodings < Test::Unit::TestCase
options[:external_encoding] = encoding.name
options[:internal_encoding] = __ENCODING__.name
begin
- CSV.open(@temp_csv_path, options) do |csv|
+ CSV.open(@temp_csv_path, **options) do |csv|
csv.each_with_index do |row, i|
assert_equal(orig_fields[i], row)
end