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 | c23d67293221c287f30320ff83ee957f6c63757a (patch) | |
tree | cf522e8aa66bc3567038ebe0aad5724ff5c6a353 /enum.c | |
parent | 364f0bfe9fa182a33a7b297546edf3b42052295a (diff) | |
download | ruby-c23d67293221c287f30320ff83ee957f6c63757a.tar.gz |
* 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: svn+ssh://ci.ruby-lang.org/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)); } /* |