summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-10 08:24:11 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-10 08:24:11 +0000
commitfa03024f577c61d1a0fc378e926453a8be754c85 (patch)
tree136740bd57ba000735d9d74696d14e0b12705e5f
parent2e25df66cedd76609685fd0c6ff25d3ad42f2e3a (diff)
downloadruby-fa03024f577c61d1a0fc378e926453a8be754c85.tar.gz
ruby-fa03024f577c61d1a0fc378e926453a8be754c85.tar.xz
ruby-fa03024f577c61d1a0fc378e926453a8be754c85.zip
* vm_eval.c (yield_under): yields self the same as 1.8.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--test/ruby/test_module.rb2
-rw-r--r--vm_eval.c5
3 files changed, 5 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 6f8f28547..a4d23301e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 da4caa7eb..2df31d06d 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?
diff --git a/vm_eval.c b/vm_eval.c
index af0a4884d..f0b23168f 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -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);