1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* enumerator.c (enum_each_cons): move RETURN_ENUMERATOR() after

argument check.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2006-10-27 08:31:10 +00:00
parent 270ba8d81e
commit 833551800d
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Fri Oct 27 17:30:31 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* enumerator.c (enum_each_cons): move RETURN_ENUMERATOR() after
argument check.
Thu Oct 26 21:05:48 2006 GOTOU Yuuzou <gotoyuzo@notwork.org>
* ext/openssl/ossl_pkcs7.c (ossl_pkcs7_verify): should clear error.

View file

@ -195,8 +195,8 @@ enum_each_cons(VALUE obj, VALUE n)
long size = NUM2LONG(n);
VALUE args[2];
RETURN_ENUMERATOR(obj, 1, &n);
if (size <= 0) rb_raise(rb_eArgError, "invalid size");
RETURN_ENUMERATOR(obj, 1, &n);
args[0] = rb_ary_new2(size);
args[1] = (VALUE)size;