Project

General

Profile

Bug #19983

Updated by Eregon (Benoit Daloze) about 1 year ago

``` 
 $ ruby -v -e 'def m(*); ->(*) { p(*) }; end; m(1).call(2)'   
 ruby 3.3.0dev (2023-10-30T09:27:06Z master 14fa5e39d7) [x86_64-linux] 
 1 
 ``` 

 But I would expect `2`. 

 Much like: 
 ``` 
 $ ruby -e 'def m(a); ->(a) { p(a) }; end; m(1).call(2)' 
 ruby 3.3.0dev (2023-10-30T09:27:06Z master 14fa5e39d7) [x86_64-linux] 
 2 
 ``` 

 i.e. the inner variable should win. 

 Also affects at least 3.2.

Back