* test/ruby/test_class.rb (test_cannot_reinitialize_class_with_initialize_copy),

(test_invalid_superclass): get rid of confusing ruby-mode.el.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-12-29 01:13:53 +00:00
parent df158322cf
commit 1180302200

View File

@ -272,7 +272,7 @@ class TestClass < Test::Unit::TestCase
end end
def test_cannot_reinitialize_class_with_initialize_copy # [ruby-core:50869] def test_cannot_reinitialize_class_with_initialize_copy # [ruby-core:50869]
assert_in_out_err([], <<-RUBY, ["Object"], []) assert_in_out_err([], <<-'end;', ["Object"], [])
class Class class Class
def initialize_copy(*); super; end def initialize_copy(*); super; end
end end
@ -283,7 +283,7 @@ class TestClass < Test::Unit::TestCase
A.send(:initialize_copy, Class.new(B)) rescue nil A.send(:initialize_copy, Class.new(B)) rescue nil
p A.superclass p A.superclass
RUBY end;
end end
module M module M
@ -302,38 +302,38 @@ class TestClass < Test::Unit::TestCase
def test_invalid_superclass def test_invalid_superclass
assert_raise(TypeError) do assert_raise(TypeError) do
eval <<-EOF eval <<-'end;'
class C < nil class C < nil
end end
EOF end;
end end
assert_raise(TypeError) do assert_raise(TypeError) do
eval <<-EOF eval <<-'end;'
class C < false class C < false
end end
EOF end;
end end
assert_raise(TypeError) do assert_raise(TypeError) do
eval <<-EOF eval <<-'end;'
class C < true class C < true
end end
EOF end;
end end
assert_raise(TypeError) do assert_raise(TypeError) do
eval <<-EOF eval <<-'end;'
class C < 0 class C < 0
end end
EOF end;
end end
assert_raise(TypeError) do assert_raise(TypeError) do
eval <<-EOF eval <<-'end;'
class C < "" class C < ""
end end
EOF end;
end end
end end
end end