summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-09 04:59:07 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-09 04:59:07 +0000
commitc23d67293221c287f30320ff83ee957f6c63757a (patch)
treecf522e8aa66bc3567038ebe0aad5724ff5c6a353 /enum.c
parent364f0bfe9fa182a33a7b297546edf3b42052295a (diff)
downloadruby-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/enum.c b/enum.c
index 096772dd2c..b778bfea84 100644
--- a/enum.c
+++ b/enum.c
@@ -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));
}
/*