* variable.c, vm_method.c: remove dead code.
* test/ruby/test_fiber.rb, test/ruby/test_thread.rb: change accordingly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
00b8bd5c87
commit
fe360c463c
@ -1,3 +1,10 @@
|
|||||||
|
Sun Aug 18 20:17:41 2013 Kazuki Tsujimoto <kazuki@callcc.net>
|
||||||
|
|
||||||
|
* variable.c, vm_method.c: remove dead code.
|
||||||
|
|
||||||
|
* test/ruby/test_fiber.rb, test/ruby/test_thread.rb:
|
||||||
|
change accordingly.
|
||||||
|
|
||||||
Sun Aug 18 19:32:26 2013 Kazuki Tsujimoto <kazuki@callcc.net>
|
Sun Aug 18 19:32:26 2013 Kazuki Tsujimoto <kazuki@callcc.net>
|
||||||
|
|
||||||
* error.c, file.c, gc.c, hash.c, thread.c, variable.c, vm_eval.c, bin/erb:
|
* error.c, file.c, gc.c, hash.c, thread.c, variable.c, vm_eval.c, bin/erb:
|
||||||
|
@ -217,10 +217,7 @@ class TestFiber < Test::Unit::TestCase
|
|||||||
def test_no_valid_cfp
|
def test_no_valid_cfp
|
||||||
bug5083 = '[ruby-dev:44208]'
|
bug5083 = '[ruby-dev:44208]'
|
||||||
assert_equal([], Fiber.new(&Module.method(:nesting)).resume)
|
assert_equal([], Fiber.new(&Module.method(:nesting)).resume)
|
||||||
error = assert_raise(RuntimeError) do
|
assert_instance_of(Class, Fiber.new(&Class.new.method(:undef_method)).resume(:to_s))
|
||||||
Fiber.new(&Module.method(:undef_method)).resume(:to_s)
|
|
||||||
end
|
|
||||||
assert_equal("Can't call on top of Fiber or Thread", error.message, bug5083)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_prohibit_resume_transfered_fiber
|
def test_prohibit_resume_transfered_fiber
|
||||||
|
@ -493,10 +493,7 @@ class TestThread < Test::Unit::TestCase
|
|||||||
skip 'with win32ole, cannot run this testcase because win32ole redefines Thread#intialize' if defined?(WIN32OLE)
|
skip 'with win32ole, cannot run this testcase because win32ole redefines Thread#intialize' if defined?(WIN32OLE)
|
||||||
bug5083 = '[ruby-dev:44208]'
|
bug5083 = '[ruby-dev:44208]'
|
||||||
assert_equal([], Thread.new(&Module.method(:nesting)).value)
|
assert_equal([], Thread.new(&Module.method(:nesting)).value)
|
||||||
error = assert_raise(RuntimeError) do
|
assert_instance_of(Thread, Thread.new(:to_s, &Class.new.method(:undef_method)).join)
|
||||||
Thread.new(:to_s, &Module.method(:undef_method)).join
|
|
||||||
end
|
|
||||||
assert_equal("Can't call on top of Fiber or Thread", error.message, bug5083)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def make_handle_interrupt_test_thread1 flag
|
def make_handle_interrupt_test_thread1 flag
|
||||||
|
@ -2191,8 +2191,6 @@ rb_define_const(VALUE klass, const char *name, VALUE val)
|
|||||||
if (!rb_is_const_id(id)) {
|
if (!rb_is_const_id(id)) {
|
||||||
rb_warn("rb_define_const: invalid name `%s' for constant", name);
|
rb_warn("rb_define_const: invalid name `%s' for constant", name);
|
||||||
}
|
}
|
||||||
if (klass == rb_cObject) {
|
|
||||||
}
|
|
||||||
rb_const_set(klass, id, val);
|
rb_const_set(klass, id, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -672,8 +672,6 @@ remove_method(VALUE klass, ID mid)
|
|||||||
VALUE self = klass;
|
VALUE self = klass;
|
||||||
|
|
||||||
klass = RCLASS_ORIGIN(klass);
|
klass = RCLASS_ORIGIN(klass);
|
||||||
if (klass == rb_cObject) {
|
|
||||||
}
|
|
||||||
rb_check_frozen(klass);
|
rb_check_frozen(klass);
|
||||||
if (mid == object_id || mid == id__send__ || mid == idInitialize) {
|
if (mid == object_id || mid == id__send__ || mid == idInitialize) {
|
||||||
rb_warn("removing `%s' may cause serious problems", rb_id2name(mid));
|
rb_warn("removing `%s' may cause serious problems", rb_id2name(mid));
|
||||||
@ -755,9 +753,6 @@ rb_export_method(VALUE klass, ID name, rb_method_flag_t noex)
|
|||||||
rb_method_entry_t *me;
|
rb_method_entry_t *me;
|
||||||
VALUE defined_class;
|
VALUE defined_class;
|
||||||
|
|
||||||
if (klass == rb_cObject) {
|
|
||||||
}
|
|
||||||
|
|
||||||
me = search_method(klass, name, &defined_class);
|
me = search_method(klass, name, &defined_class);
|
||||||
if (!me && RB_TYPE_P(klass, T_MODULE)) {
|
if (!me && RB_TYPE_P(klass, T_MODULE)) {
|
||||||
me = search_method(rb_cObject, name, &defined_class);
|
me = search_method(rb_cObject, name, &defined_class);
|
||||||
@ -857,8 +852,6 @@ rb_undef(VALUE klass, ID id)
|
|||||||
if (NIL_P(klass)) {
|
if (NIL_P(klass)) {
|
||||||
rb_raise(rb_eTypeError, "no class to undef method");
|
rb_raise(rb_eTypeError, "no class to undef method");
|
||||||
}
|
}
|
||||||
if (rb_vm_cbase() == rb_cObject && klass == rb_cObject) {
|
|
||||||
}
|
|
||||||
rb_frozen_class_p(klass);
|
rb_frozen_class_p(klass);
|
||||||
if (id == object_id || id == id__send__ || id == idInitialize) {
|
if (id == object_id || id == id__send__ || id == idInitialize) {
|
||||||
rb_warn("undefining `%s' may cause serious problems", rb_id2name(id));
|
rb_warn("undefining `%s' may cause serious problems", rb_id2name(id));
|
||||||
@ -1207,8 +1200,6 @@ rb_alias(VALUE klass, ID name, ID def)
|
|||||||
}
|
}
|
||||||
|
|
||||||
rb_frozen_class_p(klass);
|
rb_frozen_class_p(klass);
|
||||||
if (klass == rb_cObject) {
|
|
||||||
}
|
|
||||||
|
|
||||||
again:
|
again:
|
||||||
orig_me = search_method(klass, def, 0);
|
orig_me = search_method(klass, def, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user