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:
parent
cdacb127fc
commit
2e9ba7e77b
1 changed files with 2 additions and 2 deletions
4
eval.c
4
eval.c
|
@ -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:
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue