ruby-changes:13918
From: mame <ko1@a...>
Date: Thu, 12 Nov 2009 01:32:47 +0900 (JST)
Subject: [ruby-changes:13918] Ruby:r25721 (trunk): * enumerator.c (yielder_yield_push): Yielder#<< should return self.
mame 2009-11-12 01:32:34 +0900 (Thu, 12 Nov 2009) New Revision: 25721 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25721 Log: * enumerator.c (yielder_yield_push): Yielder#<< should return self. [ruby-dev:39660] Modified files: trunk/ChangeLog trunk/enumerator.c Index: ChangeLog =================================================================== --- ChangeLog (revision 25720) +++ ChangeLog (revision 25721) @@ -1,3 +1,8 @@ +Thu Nov 12 01:29:15 2009 Yusuke Endoh <mame@t...> + + * enumerator.c (yielder_yield_push): Yielder#<< should return self. + [ruby-dev:39660] + Wed Nov 11 19:17:35 2009 Nobuyoshi Nakada <nobu@r...> * lib/tempfile.rb (Tempfile#initialize): merge mode option. Index: enumerator.c =================================================================== --- enumerator.c (revision 25720) +++ enumerator.c (revision 25721) @@ -1012,6 +1012,13 @@ return rb_proc_call(ptr->proc, args); } +/* :nodoc: */ +static VALUE yielder_yield_push(VALUE obj, VALUE args) +{ + yielder_yield(obj, args); + return obj; +} + static VALUE yielder_yield_i(VALUE obj, VALUE memo, int argc, VALUE *argv) { @@ -1228,7 +1235,7 @@ rb_define_alloc_func(rb_cYielder, yielder_allocate); rb_define_method(rb_cYielder, "initialize", yielder_initialize, 0); rb_define_method(rb_cYielder, "yield", yielder_yield, -2); - rb_define_method(rb_cYielder, "<<", yielder_yield, -2); + rb_define_method(rb_cYielder, "<<", yielder_yield_push, -2); id_rewind = rb_intern("rewind"); id_each = rb_intern("each"); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/