diff --git a/ChangeLog b/ChangeLog index 8be2fa40bb..6929c73e70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Jun 13 12:55:37 2008 Yukihiro Matsumoto + + * enum.c (sort_by_i): use NODE_DOT2 instead of NODE_MEMO to avoid + extra calls to is_pointer_to_heap() in GC. + + * enum.c (enum_zip): ditto. + Fri Jun 13 00:41:58 2008 Yusuke Endoh * test/ruby/test_thread.rb: add a test. diff --git a/enum.c b/enum.c index e4d4ee5969..b704732d91 100644 --- a/enum.c +++ b/enum.c @@ -691,7 +691,8 @@ sort_by_i(VALUE i, VALUE ary, int argc, VALUE *argv) if (RBASIC(ary)->klass) { rb_raise(rb_eRuntimeError, "sort_by reentered"); } - memo = rb_node_newnode(NODE_MEMO, rb_yield(i), i, 0); + /* use NODE_DOT2 as memo(v, v, -) */ + memo = rb_node_newnode(NODE_DOT2, rb_yield(i), i, 0); rb_ary_push(ary, (VALUE)memo); return Qnil; } @@ -1574,7 +1575,8 @@ enum_zip(int argc, VALUE *argv, VALUE obj) if (!rb_block_given_p()) { result = rb_ary_new(); } - memo = rb_node_newnode(NODE_MEMO, result, rb_ary_new4(argc, argv), 0); + /* use NODE_DOT2 as memo(v, v, -) */ + memo = rb_node_newnode(NODE_DOT2, result, rb_ary_new4(argc, argv), 0); rb_block_call(obj, id_each, 0, 0, allary ? zip_ary : zip_i, (VALUE)memo); return result; diff --git a/version.h b/version.h index b04cf2d790..a8aebd55a3 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.9.0" -#define RUBY_RELEASE_DATE "2008-06-12" +#define RUBY_RELEASE_DATE "2008-06-13" #define RUBY_VERSION_CODE 190 -#define RUBY_RELEASE_CODE 20080612 +#define RUBY_RELEASE_CODE 20080613 #define RUBY_PATCHLEVEL 0 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_YEAR 2008 #define RUBY_RELEASE_MONTH 6 -#define RUBY_RELEASE_DAY 12 +#define RUBY_RELEASE_DAY 13 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[];