ruby-changes:57634
From: Jeremy <ko1@a...>
Date: Sat, 7 Sep 2019 12:20:17 +0900 (JST)
Subject: [ruby-changes:57634] 146677a1e7 (master): Fix keyword argument warnings in the tests from Class#new
https://git.ruby-lang.org/ruby.git/commit/?id=146677a1e7 From 146677a1e76fd33d86894d0430ea137dbc63579a Mon Sep 17 00:00:00 2001 From: Jeremy Evans <code@j...> Date: Fri, 6 Sep 2019 13:37:31 -0700 Subject: Fix keyword argument warnings in the tests from Class#new This were previously hidden because calls from C were not warned. diff --git a/test/csv/parse/test_header.rb b/test/csv/parse/test_header.rb index d92d823..61346c2 100644 --- a/test/csv/parse/test_header.rb +++ b/test/csv/parse/test_header.rb @@ -312,12 +312,12 @@ A https://github.com/ruby/ruby/blob/trunk/test/csv/parse/test_header.rb#L312 end def test_parse_empty - assert_equal(CSV::Table.new([], {}), + assert_equal(CSV::Table.new([], **{}), CSV.parse("", headers: true)) end def test_parse_empty_line - assert_equal(CSV::Table.new([], {}), + assert_equal(CSV::Table.new([], **{}), CSV.parse("\n", headers: true)) end diff --git a/test/csv/parse/test_rewind.rb b/test/csv/parse/test_rewind.rb index 73a69e9..43fd8da 100644 --- a/test/csv/parse/test_rewind.rb +++ b/test/csv/parse/test_rewind.rb @@ -7,7 +7,7 @@ class TestCSVParseRewind < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/csv/parse/test_rewind.rb#L7 extend DifferentOFS def parse(data, options={}) - csv = CSV.new(data, options) + csv = CSV.new(data, **options) records = csv.to_a csv.rewind [records, csv.to_a] diff --git a/test/logger/test_logdevice.rb b/test/logger/test_logdevice.rb index 2c842e9..428d83c 100644 --- a/test/logger/test_logdevice.rb +++ b/test/logger/test_logdevice.rb @@ -30,7 +30,7 @@ class TestLogDevice < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/logger/test_logdevice.rb#L30 end def d(log, opt = {}) - Logger::LogDevice.new(log, opt) + Logger::LogDevice.new(log, **opt) end def test_initialize diff --git a/test/test_tempfile.rb b/test/test_tempfile.rb index 203059e..8fcba3a 100644 --- a/test/test_tempfile.rb +++ b/test/test_tempfile.rb @@ -8,8 +8,8 @@ class TestTempfile < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_tempfile.rb#L8 @tempfile = nil end - def tempfile(*args, &block) - t = Tempfile.new(*args, &block) + def tempfile(*args, **kw, &block) + t = Tempfile.new(*args, **kw, &block) @tempfile = (t unless block) end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/