aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--eval.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d423b9827c..d9e68459d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jul 18 16:52:29 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * eval.c (yield_under_i): argument should be passed in avalue
+ from. [ruby-dev:29044]
+
Tue Jul 18 15:49:42 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* pack.c (pack_unpack): propagate association array to copied
diff --git a/eval.c b/eval.c
index 151a4f1b86..aed3565c76 100644
--- a/eval.c
+++ b/eval.c
@@ -6481,8 +6481,10 @@ static VALUE
yield_under_i(VALUE arg)
{
VALUE *args = (VALUE *)arg;
+ int flags = YIELD_PUBLIC_DEF;
+ if (args[0] != Qundef) flags |= YIELD_ARY_ARGS;
- return rb_yield_0(args[0], args[1], ruby_cbase, YIELD_PUBLIC_DEF);
+ return rb_yield_0(args[0], args[1], ruby_cbase, flags);
}
/* block eval under the class/module context */