[#120465] [Ruby master Bug#20998] rb_str_locktmp() changes flags of frozen strings and string literals — "Eregon (Benoit Daloze) via ruby-core" <ruby-core@...>
Issue #20998 has been reported by Eregon (Benoit Daloze).
17 messages
2025/01/03
[ruby-core:120744] [Ruby master Bug#20965] `it` vs `binding.local_variables`
From:
"mame (Yusuke Endoh) via ruby-core" <ruby-core@...>
Date:
2025-01-20 09:47:50 UTC
List:
ruby-core #120744
Issue #20965 has been updated by mame (Yusuke Endoh).
I have created a new issue as #21049.
----------------------------------------
Bug #20965: `it` vs `binding.local_variables`
https://bugs.ruby-lang.org/issues/20965#change-111577
* Author: zverok (Victor Shepelev)
* Status: Open
* ruby -v: ruby 3.4.0dev (2024-12-15T13:36:38Z master 366fd9642f) +PRISM [x86_64-linux]
* Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONTNEED
----------------------------------------
`it` is not available in the list of `binding.local_varaibles`, **unlike** numbered parameters:
```ruby
p(proc { binding.local_variables }.call) # []
p(proc { |x| binding.local_variables }.call) # [:x]
p(proc { _1; binding.local_variables }.call) # [:_1]
p(proc { vars = binding.local_variables; _1; vars }.call) # [:_1, :vars]
p(proc { it; binding.local_variables }.call) # []
```
I wonder if it is deliberate or accidental.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- [email protected]
To unsubscribe send an email to [email protected]
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/