summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-24 02:04:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-24 02:04:33 +0000
commit977a5147b49d15fe9e6f8f0f82c6daf44ea63395 (patch)
tree8e1f563a939bed81cb8f46a1dc70e23ee93ad209 /parse.y
parent91c6d41ac34d5a1d9ce3f82be4d0b8537de0ee45 (diff)
parse.y: resurrect before pindown
* parse.y (rb_pin_dynamic_symbol): resurrect the dynamic symbol which may be unmarked already and swept at next time, before pindown. * parse.y (dsym_node_gen): now rb_intern_str() resurrects dynamic symbols, via lookup_sym_id() and rb_pin_dynamic_symbol(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 1 insertions, 3 deletions
diff --git a/parse.y b/parse.y
index 48b6ea1403..30ea0c8133 100644
--- a/parse.y
+++ b/parse.y
@@ -9571,9 +9571,6 @@ dsym_node_gen(struct parser_params *parser, NODE *node)
case NODE_STR:
lit = node->nd_lit;
node->nd_lit = ID2SYM(rb_intern_str(lit));
- if (!STATIC_SYM_P(node->nd_lit)) {
- rb_gc_resurrect(node->nd_lit);
- }
nd_set_type(node, NODE_LIT);
break;
default:
@@ -10469,6 +10466,7 @@ setup_fake_str(struct RString *fake_str, const char *name, long len)
ID
rb_pin_dynamic_symbol(VALUE sym)
{
+ rb_gc_resurrect(sym);
/* stick dynamic symbol */
if (!st_insert(global_symbols.pinned_dsym, sym, (st_data_t)sym)) {
global_symbols.pinned_dsym_minor_marked = 0;