* vm_eval.c (yield_under): yields self the same as 1.8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4ba0fe5fd3
commit
9071538179
@ -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>
|
Thu Dec 10 15:49:13 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* thread_pthread.c (native_mutex_reinitialize_atfork): release and
|
* thread_pthread.c (native_mutex_reinitialize_atfork): release and
|
||||||
|
@ -238,7 +238,7 @@ class TestModule < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
assert("foo", Other.class_eval_test)
|
assert("foo", Other.class_eval_test)
|
||||||
|
|
||||||
assert_equal([], Other.class_eval { |*args| args })
|
assert_equal([Other], Other.class_eval { |*args| args })
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_const_defined?
|
def test_const_defined?
|
||||||
|
@ -1172,12 +1172,7 @@ yield_under(VALUE under, VALUE self, VALUE values)
|
|||||||
cref->flags |= NODE_FL_CREF_PUSHED_BY_EVAL;
|
cref->flags |= NODE_FL_CREF_PUSHED_BY_EVAL;
|
||||||
|
|
||||||
if (values == Qundef) {
|
if (values == Qundef) {
|
||||||
#if 0
|
|
||||||
/* The behavior of Ruby 1.8 */
|
|
||||||
return vm_yield_with_cref(th, 1, &self, cref);
|
return vm_yield_with_cref(th, 1, &self, cref);
|
||||||
#else
|
|
||||||
return vm_yield_with_cref(th, 0, 0, cref);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return vm_yield_with_cref(th, RARRAY_LENINT(values), RARRAY_PTR(values), cref);
|
return vm_yield_with_cref(th, RARRAY_LENINT(values), RARRAY_PTR(values), cref);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user