diff options
author | Yusuke Endoh <[email protected]> | 2024-09-13 13:48:51 +0900 |
---|---|---|
committer | Yusuke Endoh <[email protected]> | 2024-09-13 16:52:38 +0900 |
commit | 0f3dc2f958bd1447cc459bc4a4f39071a6a07a9c (patch) | |
tree | 18778bfcd6c52ff80ad05d6e2cf5bd7b5bb6ffd9 /test/ruby/test_syntax.rb | |
parent | b6c7226facc140bf8976d48fbd6c06f729534379 (diff) |
Prevent warnings "the block passed to ... may be ignored"
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11611
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 bd15d7c9f3..fe6fa30e02 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -1387,7 +1387,7 @@ eom def test_block_after_cmdarg_in_paren bug11873 = '[ruby-core:72482] [Bug #11873]' - def bug11873.p(*);end; + def bug11873.p(*, &);end; assert_raise(LocalJumpError, bug11873) do bug11873.instance_eval do @@ -2256,7 +2256,7 @@ eom end end - def caller_lineno(*) + def caller_lineno(*, &) caller_locations(1, 1)[0].lineno end end |