mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* parse.y (symbols_i): like r45492, call rb_gc_resurrect().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7973883c3a
commit
0f51db6a1e
3 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue Apr 29 10:21:38 2014 Kazuki Tsujimoto <kazuki@callcc.net>
|
||||
|
||||
* parse.y (symbols_i): like r45492, call rb_gc_resurrect().
|
||||
|
||||
Tue Apr 29 04:29:05 2014 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
||||
|
||||
* file.c (HAVE_STRUCT_STATFS_T_F_FSTYPENAME): Add new macro for
|
||||
|
|
8
parse.y
8
parse.y
|
@ -10908,9 +10908,13 @@ rb_make_internal_id(void)
|
|||
}
|
||||
|
||||
static int
|
||||
symbols_i(VALUE sym, ID value, VALUE ary)
|
||||
symbols_i(VALUE key, ID value, VALUE ary)
|
||||
{
|
||||
rb_ary_push(ary, ID2SYM(value));
|
||||
VALUE sym = ID2SYM(value);
|
||||
if (ID_DYNAMIC_SYM_P(value)) {
|
||||
rb_gc_resurrect(sym);
|
||||
}
|
||||
rb_ary_push(ary, sym);
|
||||
return ST_CONTINUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -232,5 +232,9 @@ class TestSymbol < Test::Unit::TestCase
|
|||
assert_normal_exit('".".intern;GC.start(immediate_sweep:false);eval %[GC.start;%i"."]',
|
||||
'',
|
||||
child_env: '--disable-gems')
|
||||
assert_normal_exit('tap{".".intern};GC.start(immediate_sweep:false);' +
|
||||
'eval %[syms=Symbol.all_symbols;GC.start;syms.each(&:to_sym)]',
|
||||
'',
|
||||
child_env: '--disable-gems')
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue