diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-08-30 21:56:50 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2019-08-30 21:56:50 -0700 |
commit | ec6206a81a1d61efe5bda69ab704c09e75033c01 (patch) | |
tree | 0bab6c1fb1ba657b9edcbc6c235211f3160c800b /test | |
parent | 3463e83192215c36bdcebad8be907eaa09593a41 (diff) | |
download | ruby-ec6206a81a1d61efe5bda69ab704c09e75033c01.tar.gz |
Use more accurate source location in keyword argument separation warnings
This shows locations in places it didn't before, such as for
proc calls, and fixes the location for super calls.
This requires making iseq_location non-static and MJIT exported,
which I hope will not cause problems.
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_keyword.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ruby/test_keyword.rb b/test/ruby/test_keyword.rb index 2630983a71..6212d582f5 100644 --- a/test/ruby/test_keyword.rb +++ b/test/ruby/test_keyword.rb @@ -308,18 +308,18 @@ class TestKeywordArguments < Test::Unit::TestCase assert_equal(expect, rest_keyrest(*expect), bug7665) end pr = proc {|*args, **opt| next *args, opt} - assert_warn(/The last argument for `call' is used as the keyword parameter/) do + assert_warn(/The last argument for `call' .* is used as the keyword parameter/) do assert_equal(expect, pr.call(*expect), bug7665) end - assert_warn(/The last argument for `call' is used as the keyword parameter/) do + assert_warn(/The last argument for `call' .* is used as the keyword parameter/) do assert_equal(expect, pr.call(expect), bug8463) end pr = proc {|a, *b, **opt| next a, *b, opt} - assert_warn(/The last argument for `call' is used as the keyword parameter/) do + assert_warn(/The last argument for `call' .* is used as the keyword parameter/) do assert_equal(expect, pr.call(expect), bug8463) end pr = proc {|a, **opt| next a, opt} - assert_warn(/The last argument for `call' is used as the keyword parameter/) do + assert_warn(/The last argument for `call' .* is used as the keyword parameter/) do assert_equal(expect.values_at(0, -1), pr.call(expect), bug8463) end end |