diff options
author | Marc-Andre Lafortune <github@marc-andre.ca> | 2019-12-23 02:34:16 -0500 |
---|---|---|
committer | Marc-Andre Lafortune <github@marc-andre.ca> | 2019-12-23 16:47:33 -0500 |
commit | 819b604037c317d2b53a1aaca67aef25da2d5ec9 (patch) | |
tree | 0dfc97bef8bdac44091e2c627325ed61fd61a16c /test/-ext-/funcall | |
parent | df6f5c44af1f261fa940ec3954468be8b820450e (diff) | |
download | ruby-819b604037c317d2b53a1aaca67aef25da2d5ec9.tar.gz |
Reword keyword arguments warning messages to convey these are deprecation warnings
Diffstat (limited to 'test/-ext-/funcall')
-rw-r--r-- | test/-ext-/funcall/test_passing_block.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/-ext-/funcall/test_passing_block.rb b/test/-ext-/funcall/test_passing_block.rb index dd67b7c7de..d1164871b0 100644 --- a/test/-ext-/funcall/test_passing_block.rb +++ b/test/-ext-/funcall/test_passing_block.rb @@ -29,7 +29,7 @@ class TestFuncall < Test::Unit::TestCase assert_equal([[{}], {}], Relay.with_funcall_passing_block_kw(2, {}, **{}, &block)) assert_equal([[], {a: 1}], Relay.with_funcall_passing_block_kw(3, a: 1, &block)) assert_equal([[{a: 1}], {}], Relay.with_funcall_passing_block_kw(3, {a: 1}, **{}, &block)) - assert_warn(/warning: The keyword argument is passed as the last hash parameter.*The called method is defined here/m) do + assert_warn(/warning: Passing the keyword argument as the last hash parameter is deprecated.*The called method is defined here/m) do assert_equal({}, Relay.with_funcall_passing_block_kw(3, **{}, &->(a){a})) end end @@ -53,7 +53,7 @@ class TestFuncall < Test::Unit::TestCase assert_equal([[], {a: 1}], Relay.with_funcallv_public_kw(o, :foo, 3, a: 1)) assert_equal([[{a: 1}], {}], Relay.with_funcallv_public_kw(o, :foo, 3, {a: 1}, **{})) assert_raise(NoMethodError) { Relay.with_funcallv_public_kw(o, :bar, 3, {a: 1}, **{}) } - assert_warn(/warning: The keyword argument is passed as the last hash parameter.*The called method `baz'/m) do + assert_warn(/warning: Passing the keyword argument as the last hash parameter is deprecated.*The called method `baz'/m) do assert_equal({}, Relay.with_funcallv_public_kw(o, :baz, 3, **{})) end end @@ -64,11 +64,11 @@ class TestFuncall < Test::Unit::TestCase assert_equal([[], {a: 1}], Relay.with_yield_splat_kw(1, [{a: 1}], &block)) assert_equal([[1], {a: 1}], Relay.with_yield_splat_kw(1, [1, {a: 1}], &block)) assert_equal([[{}], {}], Relay.with_yield_splat_kw(2, [{}], **{}, &block)) - assert_warn(/warning: The last argument is used as keyword parameters.*The called method is defined here/m) do + assert_warn(/warning: Using the last argument as keyword parameters is deprecated.*The called method is defined here/m) do assert_equal([[], {a: 1}], Relay.with_yield_splat_kw(3, [{a: 1}], &block)) end assert_equal([[{a: 1}], {}], Relay.with_yield_splat_kw(3, [{a: 1}], **{}, &block)) - assert_warn(/warning: The keyword argument is passed as the last hash parameter/) do + assert_warn(/warning: Passing the keyword argument as the last hash parameter is deprecated/) do assert_equal({}, Relay.with_yield_splat_kw(3, [], **{}, &->(a){a})) end end |