summaryrefslogtreecommitdiff
path: root/test/ruby/test_struct.rb
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-12-20 19:41:15 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-12-20 19:41:15 +0900
commitf7aee584987e24768670e96b1455ed1193f91ef2 (patch)
tree6f6465e61af7bc2581abdaad09ac8e5786975d6a /test/ruby/test_struct.rb
parent2b2030f265e4ec0782de9c8dd9f8828a1a0af1b5 (diff)
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_struct.rb')
-rw-r--r--test/ruby/test_struct.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_struct.rb b/test/ruby/test_struct.rb
index 9438160a6f..6f31b334b1 100644
--- a/test/ruby/test_struct.rb
+++ b/test/ruby/test_struct.rb
@@ -115,7 +115,7 @@ module TestStruct
assert_equal "#{@Struct}::KeywordInitTrue(keyword_init: true)", @Struct::KeywordInitTrue.inspect
# eval is needed to prevent the warning duplication filter
k = eval("Class.new(@Struct::KeywordInitFalse) {def initialize(**) end}")
- assert_warn(/The last argument is used as the keyword parameter/) {k.new(a: 1, b: 2)}
+ assert_warn(/The last argument is used as keyword parameters/) {k.new(a: 1, b: 2)}
k = Class.new(@Struct::KeywordInitTrue) {def initialize(**) end}
assert_warn('') {k.new(a: 1, b: 2)}