summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-04 16:35:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-04 16:35:10 +0000
commitc7bd98b7b8848f7d20b44cdb4878d024c3692bc4 (patch)
treeb0c1b081c14610ad8ead8d4b600a9154a335c248 /string.c
parent408ca7cbb1e0d7866405fe1a6b3aa6f4dc8409fb (diff)
* string.c (sym_to_proc): use hidden object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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);
}