* eval.c (yield_under_i): should not pass self as an argument to

the block for instance_eval.  [ruby-core:07364]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2006-02-15 01:24:20 +00:00
Родитель ba8954361d
Коммит 7d863d5c97
2 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -1,6 +1,11 @@
Wed Feb 15 10:09:51 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (yield_under_i): should not pass self as an argument to
the block for instance_eval. [ruby-core:07364]
Wed Feb 15 09:20:35 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_obj_instance_eval): should no singleton classes for
* eval.c (rb_obj_instance_eval): should be no singleton classes for
true, false, and nil. [ruby-dev:28186]
Tue Feb 14 20:26:00 2006 Yukihiro Matsumoto <matz@ruby-lang.org>

3
eval.c
Просмотреть файл

@ -6466,7 +6466,6 @@ yield_under_i(VALUE arg)
VALUE avalue = Qtrue;
if (args[0] == Qundef) {
avalue = Qfalse;
args[0] = args[1];
}
return rb_yield_0(args[0], args[1], ruby_cbase, YIELD_PUBLIC_DEF, avalue);
}
@ -6475,7 +6474,7 @@ yield_under_i(VALUE arg)
static VALUE
yield_under(VALUE under, VALUE self, VALUE values)
{
VALUE args[4];
VALUE args[2];
args[0] = values;
args[1] = self;
return exec_under(yield_under_i, under, (VALUE)args);