summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-30 14:59:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-30 14:59:46 +0000
commit1d0fbdb92e0d77f1061b0bd92472f8cf888a5579 (patch)
treed3b920469c9dcea73df1421ffee3776540621e3d /gc.c
parent58bd5facb2f4926e14453254e7af50d2f93f3ca2 (diff)
gc.c: freeze GC::OPTS
* gc.c (Init_GC): freeze GC::OPTS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index 565eba4ea0..94a2616c8d 100644
--- a/gc.c
+++ b/gc.c
@@ -7830,7 +7830,7 @@ Init_GC(void)
{
VALUE opts;
rb_define_const(rb_mGC, "OPTS", opts = rb_ary_new());
-#define OPT(o) if (o) rb_ary_push(opts, rb_str_new2(#o))
+#define OPT(o) if (o) rb_ary_push(opts, rb_fstring_new(#o, strlen(#o)))
OPT(GC_DEBUG);
OPT(USE_RGENGC);
OPT(RGENGC_DEBUG);
@@ -7845,5 +7845,6 @@ Init_GC(void)
OPT(MALLOC_ALLOCATED_SIZE_CHECK);
OPT(GC_PROFILE_DETAIL_MEMORY);
#undef OPT
+ OBJ_FREEZE(opts);
}
}