From 2e9ba7e77ba49410e62c8e93ef3eafdc1cdb795b Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 1 Aug 2003 20:19:40 +0000 Subject: [PATCH] * 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 --- eval.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eval.c b/eval.c index 44d4dd0d16..a857309964 100644 --- a/eval.c +++ b/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: {