зеркало из https://github.com/github/ruby.git
Fix keyword argument warnings in the tests from Class#new
This were previously hidden because calls from C were not warned.
This commit is contained in:
Родитель
434582d888
Коммит
146677a1e7
|
@ -312,12 +312,12 @@ A
|
|||
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
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ class TestCSVParseRewind < Test::Unit::TestCase
|
|||
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]
|
||||
|
|
|
@ -30,7 +30,7 @@ class TestLogDevice < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def d(log, opt = {})
|
||||
Logger::LogDevice.new(log, opt)
|
||||
Logger::LogDevice.new(log, **opt)
|
||||
end
|
||||
|
||||
def test_initialize
|
||||
|
|
|
@ -8,8 +8,8 @@ class TestTempfile < Test::Unit::TestCase
|
|||
@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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче