diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2019-12-20 19:41:15 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2019-12-20 19:41:15 +0900 |
commit | f7aee584987e24768670e96b1455ed1193f91ef2 (patch) | |
tree | 6f6465e61af7bc2581abdaad09ac8e5786975d6a /test/ruby/test_syntax.rb | |
parent | 2b2030f265e4ec0782de9c8dd9f8828a1a0af1b5 (diff) | |
download | ruby-f7aee584987e24768670e96b1455ed1193f91ef2.tar.gz |
vm_args.c: rephrase the warning message of keyword argument separation
(old)
test.rb:4: warning: The last argument is used as the keyword parameter
test.rb:1: warning: for `foo' defined here; maybe ** should be added to the call?
(new)
test.rb:4: warning: The last argument is used as keyword parameters; maybe ** should be added to the call
test.rb:1: warning: The called method `foo' is defined here
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 d50c325a8e..4ad4640398 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.* for `kw'/m) do + assert_warn(/The last argument is split into positional and keyword parameters.*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 the keyword parameter" + warning = "warning: The last argument is used as keyword parameters" assert_warning(/\A\z|:(?!#{__LINE__+1})\d+: #{warning}/o) { assert_equal([[], {}], obj.foo({}) {|*x| x}) } |