Actions
Bug #18966
openStrange behavior when numbered parameters and method definition are both used in a block
Status:
Open
Assignee:
-
Target version:
-
ruby -v:
ruby 3.2.0dev (2022-08-19T04:20:20Z :detached: 17d0e5bee7) [x86_64-linux]
Description
'a'.tap { p _1; def f()=42 } #=> "a"
'a'.tap { p _1; def f(a)=42 } #=> nil
'a'.tap { def f()=42; p _1 } #=> "a"
'a'.tap { def f(a)=42; p _1 } # Syntax Error -:1: ordinary parameter is defined
Actions
Like0
Like0Like0Like0