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): Qundef means no argument. [ruby-Bugs-22525]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-12-08 04:51:43 +00:00
parent 65962a253c
commit fb34f6652a
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Mon Dec 8 13:51:41 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (rb_yield_0): Qundef means no argument. [ruby-Bugs-22525]
Sun Dec 7 23:47:37 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (LIBPATHFLAG): use numbered specifier if RPATHFLAG

2
eval.c
View file

@ -5060,7 +5060,7 @@ rb_yield_0(val, self, klass, flags, avalue)
switch (node->nd_state) {
case YIELD_FUNC_LAMBDA:
if (!avalue) {
val = rb_ary_new3(1, val);
val = (val == Qundef) ? rb_ary_new2(0) : rb_ary_new3(1, val);
}
break;
case YIELD_FUNC_AVALUE: