Actions
Bug #20092
closedWarnings for anonymous parameters do not display in Ruby 3.4dev
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.4.0dev (2023-12-26T22:32:38Z master be92bf4ff4) [x86_64-darwin22]
Description
I encountered no expected warnings in Ruby 3.4dev.
Reproduction code¶
def anonymous(*, **, &)
rest_block do
foo(*)
end
kwrest_block do
bar(**)
end
block_block do
baz(&)
end
end
Expected Behavior (Ruby 3.3.0)¶
Warnings are displayed:
$ ruby -vc example.rb
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22]
example.rb: example.rb:3: anonymous rest parameter is also used within block (SyntaxError)
example.rb:7: anonymous keyword rest parameter is also used within block
example.rb:11: anonymous block parameter is also used within block
Actual Behavior (Ruby 3.4dev)¶
No warning displayed:
$ ruby -vc example.rb
ruby 3.4.0dev (2023-12-26T22:32:38Z master be92bf4ff4) [x86_64-darwin22]
Syntax OK
Updated by nobu (Nobuyoshi Nakada) 11 months ago
The behavior in 3.4.0 is correct.
It was a bug #20090.
Updated by jeremyevans0 (Jeremy Evans) 11 months ago
- Status changed from Open to Closed
Actions
Like0
Like1Like0