1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
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
def initialize_copy(*); super; end
end
@ -283,7 +283,7 @@ class TestClass < Test::Unit::TestCase
A.send(:initialize_copy, Class.new(B)) rescue nil
p A.superclass
RUBY
end;
end
module M
@ -302,38 +302,38 @@ class TestClass < Test::Unit::TestCase
def test_invalid_superclass
assert_raise(TypeError) do
eval <<-EOF
eval <<-'end;'
class C < nil
end
EOF
end;
end
assert_raise(TypeError) do
eval <<-EOF
eval <<-'end;'
class C < false
end
EOF
end;
end
assert_raise(TypeError) do
eval <<-EOF
eval <<-'end;'
class C < true
end
EOF
end;
end
assert_raise(TypeError) do
eval <<-EOF
eval <<-'end;'
class C < 0
end
EOF
end;
end
assert_raise(TypeError) do
eval <<-EOF
eval <<-'end;'
class C < ""
end
EOF
end;
end
end
end