summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-24 04:24:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-24 04:24:56 +0000
commitd182cd3053153a001fa9c7901bc01ca3c625ae4e (patch)
treef2f1ce0df27967fed7ac938601940d2d3ea48558 /parse.y
parenta680ee9ffa6eeaafd6efe52edbe5ed00e8620cb0 (diff)
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
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 195df58828..0ac1ef2708 100644
--- a/parse.y
+++ b/parse.y
@@ -10759,6 +10759,8 @@ static int
lookup_id_str(ID id, st_data_t *data)
{
if (ID_DYNAMIC_SYM_P(id)) {
+ rb_gc_resurrect((VALUE)id);
+ rb_gc_resurrect(RSYMBOL(id)->fstr);
*data = RSYMBOL(id)->fstr;
return TRUE;
}