diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-04 16:35:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-04 16:35:10 +0000 |
commit | c7bd98b7b8848f7d20b44cdb4878d024c3692bc4 (patch) | |
tree | b0c1b081c14610ad8ead8d4b600a9154a335c248 | |
parent | 408ca7cbb1e0d7866405fe1a6b3aa6f4dc8409fb (diff) | |
download | ruby-c7bd98b7b8848f7d20b44cdb4878d024c3692bc4.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | string.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -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 @@ -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); } |