diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | test/ruby/test_module.rb | 2 | ||||
-rw-r--r-- | vm_eval.c | 5 |
3 files changed, 5 insertions, 6 deletions
@@ -1,3 +1,7 @@ +Thu Dec 10 17:22:36 2009 Shugo Maeda <shugo@ruby-lang.org> + + * vm_eval.c (yield_under): yields self the same as 1.8. + Thu Dec 10 15:49:13 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * thread_pthread.c (native_mutex_reinitialize_atfork): release and diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index da4caa7ebd..2df31d06df 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -238,7 +238,7 @@ class TestModule < Test::Unit::TestCase end assert("foo", Other.class_eval_test) - assert_equal([], Other.class_eval { |*args| args }) + assert_equal([Other], Other.class_eval { |*args| args }) end def test_const_defined? @@ -1172,12 +1172,7 @@ yield_under(VALUE under, VALUE self, VALUE values) cref->flags |= NODE_FL_CREF_PUSHED_BY_EVAL; if (values == Qundef) { -#if 0 - /* The behavior of Ruby 1.8 */ return vm_yield_with_cref(th, 1, &self, cref); -#else - return vm_yield_with_cref(th, 0, 0, cref); -#endif } else { return vm_yield_with_cref(th, RARRAY_LENINT(values), RARRAY_PTR(values), cref); |