mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* parse.y (dsym_node_gen): like r45492, call rb_gc_resurrect().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
708e1bd49d
commit
2dca886a07
3 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Apr 24 05:50:13 2014 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* parse.y (dsym_node_gen): like r45492, call rb_gc_resurrect().
|
||||
|
||||
Wed Apr 23 20:36:22 2014 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/etc/extconf.rb: Build ext/etc unconditionally.
|
||||
|
|
3
parse.y
3
parse.y
|
@ -9571,6 +9571,9 @@ 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:
|
||||
|
|
|
@ -221,4 +221,10 @@ class TestSymbol < Test::Unit::TestCase
|
|||
assert_equal sym, Symbol.find(str)
|
||||
end;
|
||||
end
|
||||
|
||||
def test_symol_gc_1
|
||||
assert_normal_exit('".".intern;GC.start(immediate_sweep:false);eval %[GC.start;:"."]',
|
||||
'',
|
||||
child_env: '--disable-gems')
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue