From c7bd98b7b8848f7d20b44cdb4878d024c3692bc4 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 4 Dec 2008 16:35:10 +0000 Subject: [PATCH] * 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 --- ChangeLog | 4 ++++ string.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 64bbaec6ce..b85090e2cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Dec 5 01:35:08 2008 Nobuyoshi Nakada + + * string.c (sym_to_proc): use hidden object. + Fri Dec 5 01:19:21 2008 Yukihiro Matsumoto * pack.c (pack_pack): propagate taint status from format string to 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); }