compile.c: name a hidden local variable as a predefined ID
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b8e3a4bd2c
commit
91db3b6c6b
@ -1366,12 +1366,10 @@ iseq_set_exception_local_table(rb_iseq_t *iseq)
|
|||||||
/* TODO: every id table is same -> share it.
|
/* TODO: every id table is same -> share it.
|
||||||
* Current problem is iseq_free().
|
* Current problem is iseq_free().
|
||||||
*/
|
*/
|
||||||
ID id_dollar_bang;
|
|
||||||
ID *ids = (ID *)ALLOC_N(ID, 1);
|
ID *ids = (ID *)ALLOC_N(ID, 1);
|
||||||
|
|
||||||
CONST_ID(id_dollar_bang, "#$!");
|
|
||||||
iseq->body->local_table_size = 1;
|
iseq->body->local_table_size = 1;
|
||||||
ids[0] = id_dollar_bang;
|
ids[0] = idERROR_INFO;
|
||||||
iseq->body->local_table = ids;
|
iseq->body->local_table = ids;
|
||||||
return COMPILE_OK;
|
return COMPILE_OK;
|
||||||
}
|
}
|
||||||
|
@ -70,6 +70,7 @@ firstline, predefined = __LINE__+1, %[\
|
|||||||
|
|
||||||
$_ LASTLINE
|
$_ LASTLINE
|
||||||
$~ BACKREF
|
$~ BACKREF
|
||||||
|
$! ERROR_INFO
|
||||||
]
|
]
|
||||||
|
|
||||||
# VM ID OP Parser Token
|
# VM ID OP Parser Token
|
||||||
|
Loading…
x
Reference in New Issue
Block a user