* [ruby-core:110823] [Ruby master Feature#19137] Numbered parameters are not made available to IRB.
@ 2022-11-20 3:08 0x1eef (0x 1eef)
2022-11-20 10:16 ` [ruby-core:110825] " sawa (Tsuyoshi Sawada)
2022-11-20 10:18 ` [ruby-core:110826] " sawa (Tsuyoshi Sawada)
0 siblings, 2 replies; 3+ messages in thread
From: 0x1eef (0x 1eef) @ 2022-11-20 3:08 UTC (permalink / raw)
To: ruby-core
Issue #19137 has been reported by 0x1eef (0x 1eef).
----------------------------------------
Feature #19137: Numbered parameters are not made available to IRB.
https://bugs.ruby-lang.org/issues/19137
* Author: 0x1eef (0x 1eef)
* Status: Open
* Priority: Normal
----------------------------------------
Hello !
It does not look like numbered parameters are available through the Binding that's used by IRB.
```ruby
# repl.rb
[1,2,3].each do
binding.irb
end
```
```
$ irb repl.rb
irb(main):001:0> puts _1
repl.rb:1:in `block in <top (required)>': undefined local variable or method `_1' for main:Object (NameError)
```
Is it possible for them to be available ? Thanks!
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:110825] [Ruby master Feature#19137] Numbered parameters are not made available to IRB.
2022-11-20 3:08 [ruby-core:110823] [Ruby master Feature#19137] Numbered parameters are not made available to IRB 0x1eef (0x 1eef)
@ 2022-11-20 10:16 ` sawa (Tsuyoshi Sawada)
2022-11-20 10:18 ` [ruby-core:110826] " sawa (Tsuyoshi Sawada)
1 sibling, 0 replies; 3+ messages in thread
From: sawa (Tsuyoshi Sawada) @ 2022-11-20 10:16 UTC (permalink / raw)
To: ruby-core
Issue #19137 has been updated by sawa (Tsuyoshi Sawada).
It has nothing to do with IRB. If you run `ruby repl.rb`, you will get the same result.
----------------------------------------
Feature #19137: Numbered parameters are not made available to IRB.
https://bugs.ruby-lang.org/issues/19137#change-100181
* Author: 0x1eef (0x 1eef)
* Status: Open
* Priority: Normal
----------------------------------------
Hello !
It does not look like numbered parameters are available through the Binding that's used by IRB.
```ruby
# repl.rb
[1,2,3].each do
binding.irb
end
```
```
$ irb repl.rb
irb(main):001:0> puts _1
repl.rb:1:in `block in <top (required)>': undefined local variable or method `_1' for main:Object (NameError)
```
Is it possible for them to be available ? Thanks!
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:110826] [Ruby master Feature#19137] Numbered parameters are not made available to IRB.
2022-11-20 3:08 [ruby-core:110823] [Ruby master Feature#19137] Numbered parameters are not made available to IRB 0x1eef (0x 1eef)
2022-11-20 10:16 ` [ruby-core:110825] " sawa (Tsuyoshi Sawada)
@ 2022-11-20 10:18 ` sawa (Tsuyoshi Sawada)
1 sibling, 0 replies; 3+ messages in thread
From: sawa (Tsuyoshi Sawada) @ 2022-11-20 10:18 UTC (permalink / raw)
To: ruby-core
Issue #19137 has been updated by sawa (Tsuyoshi Sawada).
I think the issue is that `_1` and so on are lexically scoped, and you want it not to be.
----------------------------------------
Feature #19137: Numbered parameters are not made available to IRB.
https://bugs.ruby-lang.org/issues/19137#change-100182
* Author: 0x1eef (0x 1eef)
* Status: Open
* Priority: Normal
----------------------------------------
Hello !
It does not look like numbered parameters are available through the Binding that's used by IRB.
```ruby
# repl.rb
[1,2,3].each do
binding.irb
end
```
```
$ irb repl.rb
irb(main):001:0> puts _1
repl.rb:1:in `block in <top (required)>': undefined local variable or method `_1' for main:Object (NameError)
```
Is it possible for them to be available ? Thanks!
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-20 10:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-20 3:08 [ruby-core:110823] [Ruby master Feature#19137] Numbered parameters are not made available to IRB 0x1eef (0x 1eef)
2022-11-20 10:16 ` [ruby-core:110825] " sawa (Tsuyoshi Sawada)
2022-11-20 10:18 ` [ruby-core:110826] " sawa (Tsuyoshi Sawada)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).