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

* eval.c (rb_yield_0): code clean up according to Nobu's patch.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2003-08-01 20:19:40 +00:00
parent cdacb127fc
commit 2e9ba7e77b

4
eval.c
View file

@ -4100,8 +4100,7 @@ rb_yield_0(val, self, klass, flags, avalue)
if (avalue) {
len = RARRAY(val)->len;
if (len == 0) {
val = Qnil;
goto multi_values;
goto zero_arg;
}
if (len == 1) {
val = RARRAY(val)->ptr[0];
@ -4111,6 +4110,7 @@ rb_yield_0(val, self, klass, flags, avalue)
}
}
else if (val == Qundef) {
zero_arg:
val = Qnil;
multi_values:
{