From: eregontp@...
Date: 2021-02-12T16:49:22+00:00
Subject: [ruby-core:102472] [Ruby master Bug#17623] endless def can access to outer local variables and lead to unexpected result

Issue #17623 has been updated by Eregon (Benoit Daloze).


I think that might be caused by https://bugs.ruby-lang.org/issues/9580#change-88660 cc @marcandre

----------------------------------------
Bug #17623: endless def can access to outer local variables and lead to unexpected result
https://bugs.ruby-lang.org/issues/17623#change-90360

* Author: UlyssesZhan (������ ���)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x64-mingw32]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
``` ruby
irb(main):001:0> a = 1
=> 1
irb(main):002:0> def f = a
=> :f
irb(main):003:0> f
=> "D:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/irb-1.3.0/exe/irb"
```
I have not idea what it means.
The codes just work fine outside irb.
Maybe it is a bug.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>