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/ruby/test_syntax.rb | |
parent | df6f5c44af1f261fa940ec3954468be8b820450e (diff) |
Reword keyword arguments warning messages to convey these are deprecation warnings
Diffstat (limited to 'test/ruby/test_syntax.rb')
-rw-r--r-- | test/ruby/test_syntax.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 4ad4640398..72f539068d 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -182,7 +182,7 @@ class TestSyntax < Test::Unit::TestCase h = {k3: 31} assert_raise(ArgumentError) {o.kw(**h)} h = {"k1"=>11, k2: 12} - assert_warn(/The last argument is split into positional and keyword parameters.*The called method `kw'/m) do + assert_warn(/Splitting the last argument into positional and keyword parameters is deprecated.*The called method `kw'/m) do assert_raise(ArgumentError) {o.kw(**h)} end end @@ -1523,7 +1523,7 @@ eom assert_warning('') { assert_equal([[1, 2, 3], {k1: 4, k2: 5}], obj.foo(1, 2, 3, k1: 4, k2: 5)) } - warning = "warning: The last argument is used as keyword parameters" + warning = "warning: Using the last argument as keyword parameters is deprecated" assert_warning(/\A\z|:(?!#{__LINE__+1})\d+: #{warning}/o) { assert_equal([[], {}], obj.foo({}) {|*x| x}) } |