aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-13 09:12:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-13 09:12:05 +0000
commit641c5372edb19e5739408bb2ade46704059cd79f (patch)
tree5ab757d2e470b684308d2bfe08b6436f19de834f /string.c
parent0fc33f968d99d56afb132f6fd80983063da050cf (diff)
downloadruby-641c5372edb19e5739408bb2ade46704059cd79f.tar.gz
string.c: $; is a GC-root
* string.c (Init_String): $; must be a GC-root, not to be collected. [ruby-core:79582] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/string.c b/string.c
index 4901c38d51..ceab6ea42d 100644
--- a/string.c
+++ b/string.c
@@ -10191,6 +10191,7 @@ Init_String(void)
rb_fs = Qnil;
rb_define_hooked_variable("$;", &rb_fs, 0, rb_fs_setter);
rb_define_hooked_variable("$-F", &rb_fs, 0, rb_fs_setter);
+ rb_gc_register_address(&rb_fs);
rb_cSymbol = rb_define_class("Symbol", rb_cObject);
rb_include_module(rb_cSymbol, rb_mComparable);