aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--string.c2
2 files changed, 5 insertions, 1 deletions
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 <nobu@ruby-lang.org>
+
+ * string.c (sym_to_proc): use hidden object.
+
Fri Dec 5 01:19:21 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* 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);
}