mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (rb_yield): fix to check Qundef.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9c0b2b8b65
commit
bf544c05d2
2 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Wed Jun 6 10:58:23 2007 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* eval.c (rb_yield): fix to check Qundef.
|
||||
|
||||
Wed Jun 6 10:57:45 2007 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* test/ruby/test_continuation.rb: add a test for last commit.
|
||||
|
|
7
eval.c
7
eval.c
|
@ -914,7 +914,12 @@ VALUE
|
|||
rb_yield(VALUE val)
|
||||
{
|
||||
volatile VALUE tmp = val;
|
||||
tmp = rb_yield_0(1, &val);
|
||||
if (val == Qundef) {
|
||||
tmp = rb_yield_0(0, 0);
|
||||
}
|
||||
else {
|
||||
tmp = rb_yield_0(1, &val);
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue