Project

General

Profile

Actions

Feature #15915

closed

`@1` cannot be achieved in meta-programming

Added by znz (Kazuhiro NISHIYAMA) almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:93064]

Description

I cannot think of any way to get @1 in meta-programming, so it is hard to inspect it in a debugger.

% ruby -e 'proc{@1;binding.local_variable_get("@1")}.call(1)'
Traceback (most recent call last):
	2: from -e:1:in `<main>'
	1: from -e:1:in `block in <main>'
-e:1:in `local_variable_get': wrong local variable name `@1' for #<Binding:0x00007f952401e490> (NameError)

Files

local_variable_get-for-numparam.patch (3.61 KB) local_variable_get-for-numparam.patch mame (Yusuke Endoh), 08/23/2019 04:40 AM

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #18837: Not possible to evaluate expression with numbered parameters in itRejectedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0