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 /enum.c | |
| 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
Diffstat (limited to 'enum.c')
| -rw-r--r-- | enum.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)); } /* |
