diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-09 04:59:07 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-09 04:59:07 +0000 |
| commit | 11d5b7bae0021700d9b47afd42aa0c7aeee16beb (patch) | |
| tree | cf522e8aa66bc3567038ebe0aad5724ff5c6a353 | |
| parent | 17e061bf2cecddb531df0c8c81ccb381a07bf04b (diff) | |
| download | ruby-11d5b7bae0021700d9b47afd42aa0c7aeee16beb.tar.gz ruby-11d5b7bae0021700d9b47afd42aa0c7aeee16beb.tar.xz ruby-11d5b7bae0021700d9b47afd42aa0c7aeee16beb.zip | |
* enum.c (each_with_index_i): use rb_yield_values() for
compatibility with Enumerator#with_index(). a patch from Yusuke
ENDOH <mame AT tsg.ne.jp>. [ruby-dev:32195]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | enum.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Fri Nov 9 13:57:50 2007 Yukihiro Matsumoto <matz@ruby-lang.org> + + * enum.c (each_with_index_i): use rb_yield_values() for + compatibility with Enumerator#with_index(). a patch from Yusuke + ENDOH <mame AT tsg.ne.jp>. [ruby-dev:32195] + Fri Nov 9 13:45:05 2007 Yukihiro Matsumoto <matz@ruby-lang.org> * test/ruby/test_iterator.rb (TestIterator::IterTest::each): @@ -1295,7 +1295,7 @@ each_with_index_i(VALUE val, VALUE memo) { long n = (*(VALUE *)memo)++; - return rb_yield(rb_ary_new3(2, val, INT2NUM(n))); + return rb_yield_values(2, val, INT2NUM(n)); } /* |
