mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_module.rb (TestModule#test_undef): adjust to
message change. * test/ruby/test_object.rb (TestObject#test_redefine_method_which_may_case_serious_problem): ditto. * test/ruby/test_object.rb (TestObject#test_remove_method): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7c3fff4f54
commit
ed86848563
3 changed files with 13 additions and 4 deletions
|
@ -1,3 +1,12 @@
|
|||
Mon Jul 6 09:06:49 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* test/ruby/test_module.rb (TestModule#test_undef): adjust to
|
||||
message change.
|
||||
|
||||
* test/ruby/test_object.rb (TestObject#test_redefine_method_which_may_case_serious_problem): ditto.
|
||||
|
||||
* test/ruby/test_object.rb (TestObject#test_remove_method): ditto.
|
||||
|
||||
Mon Jul 6 09:04:45 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* enum.c (enum_join): deals with self recursive objects to get rid
|
||||
|
|
|
@ -517,7 +517,7 @@ class TestModule < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
%w(object_id __send__ initialize).each do |m|
|
||||
assert_in_out_err([], <<-INPUT, [], /warning: undefining `#{m}' may cause serious problem$/)
|
||||
assert_in_out_err([], <<-INPUT, [], /warning: undefining `#{m}' may cause serious problems$/)
|
||||
$VERBOSE = false
|
||||
Class.new.instance_eval { undef_method(:#{m}) }
|
||||
INPUT
|
||||
|
|
|
@ -233,12 +233,12 @@ class TestObject < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_redefine_method_which_may_case_serious_problem
|
||||
assert_in_out_err([], <<-INPUT, [], /warning: redefining `object_id' may cause serious problem$/)
|
||||
assert_in_out_err([], <<-INPUT, [], /warning: redefining `object_id' may cause serious problems$/)
|
||||
$VERBOSE = false
|
||||
def (Object.new).object_id; end
|
||||
INPUT
|
||||
|
||||
assert_in_out_err([], <<-INPUT, [], /warning: redefining `__send__' may cause serious problem$/)
|
||||
assert_in_out_err([], <<-INPUT, [], /warning: redefining `__send__' may cause serious problems$/)
|
||||
$VERBOSE = false
|
||||
def (Object.new).__send__; end
|
||||
INPUT
|
||||
|
@ -266,7 +266,7 @@ class TestObject < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
%w(object_id __send__ initialize).each do |m|
|
||||
assert_in_out_err([], <<-INPUT, %w(:ok), /warning: removing `#{m}' may cause serious problem$/)
|
||||
assert_in_out_err([], <<-INPUT, %w(:ok), /warning: removing `#{m}' may cause serious problems$/)
|
||||
$VERBOSE = false
|
||||
begin
|
||||
Class.new.instance_eval { remove_method(:#{m}) }
|
||||
|
|
Loading…
Add table
Reference in a new issue