From: mame@... Date: 2019-06-12T12:13:31+00:00 Subject: [ruby-core:93067] [Ruby trunk Feature#15915] `@1` cannot get from meta-programming Issue #15915 has been updated by mame (Yusuke Endoh). > What is the use case? OP says a debugger. The motivation looks reasonable to me. > And how do you want it to be made possible? I think it would be technically possible. If this ticket is accepted, `Binding#local_variables` should include numbered parameters. It might be good to allow a symbol like `:@1`. (I'm negative against numbered parameters themselves, though.) ---------------------------------------- Feature #15915: `@1` cannot get from meta-programming https://bugs.ruby-lang.org/issues/15915#change-78477 * Author: znz (Kazuhiro NISHIYAMA) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- I think no way to get `@1` from meta-programming, so debugger is hard to inspect it. ~~~ % ruby -e 'proc{@1;binding.local_variable_get("@1")}.call(1)' Traceback (most recent call last): 2: from -e:1:in `
' 1: from -e:1:in `block in
' -e:1:in `local_variable_get': wrong local variable name `@1' for # (NameError) ~~~ -- https://bugs.ruby-lang.org/ Unsubscribe: