From bf544c05d26ec4cb151cd322e69a495a58924a0d Mon Sep 17 00:00:00 2001 From: ko1 Date: Wed, 6 Jun 2007 01:57:36 +0000 Subject: [PATCH] * 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 --- ChangeLog | 4 ++++ eval.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9270ed6574..96f2879a41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Jun 6 10:58:23 2007 Koichi Sasada + + * eval.c (rb_yield): fix to check Qundef. + Wed Jun 6 10:57:45 2007 Koichi Sasada * test/ruby/test_continuation.rb: add a test for last commit. diff --git a/eval.c b/eval.c index 38c8b84cdc..0c6aceee7e 100644 --- a/eval.c +++ b/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; }