aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 641018ab4d..d652124879 100644
--- a/string.c
+++ b/string.c
@@ -6922,8 +6922,8 @@ sym_to_proc(VALUE sym)
VALUE *aryp;
if (!sym_proc_cache) {
+ sym_proc_cache = rb_ary_tmp_new(SYM_PROC_CACHE_SIZE * 2);
rb_gc_register_mark_object(sym_proc_cache);
- sym_proc_cache = rb_ary_new2(SYM_PROC_CACHE_SIZE * 2);
rb_ary_store(sym_proc_cache, SYM_PROC_CACHE_SIZE*2 - 1, Qnil);
}