mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parse.y: resurrect dynamic symbol and name
* parse.y (lookup_id_str): resurrect the dynamic symbol before accessing its content, and its name before returning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a680ee9ffa
commit
d182cd3053
1 changed files with 2 additions and 0 deletions
2
parse.y
2
parse.y
|
@ -10759,6 +10759,8 @@ static int
|
||||||
lookup_id_str(ID id, st_data_t *data)
|
lookup_id_str(ID id, st_data_t *data)
|
||||||
{
|
{
|
||||||
if (ID_DYNAMIC_SYM_P(id)) {
|
if (ID_DYNAMIC_SYM_P(id)) {
|
||||||
|
rb_gc_resurrect((VALUE)id);
|
||||||
|
rb_gc_resurrect(RSYMBOL(id)->fstr);
|
||||||
*data = RSYMBOL(id)->fstr;
|
*data = RSYMBOL(id)->fstr;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue