зеркало из https://github.com/github/ruby.git
* 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:
Родитель
4ba0fe5fd3
Коммит
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>
|
||||
|
||||
* thread_pthread.c (native_mutex_reinitialize_atfork): release and
|
||||
|
|
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче