summaryrefslogtreecommitdiff
path: root/test/ruby/test_class.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_class.rb')
-rw-r--r--test/ruby/test_class.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb
index 98acbaf67b..710b8a6f7b 100644
--- a/test/ruby/test_class.rb
+++ b/test/ruby/test_class.rb
@@ -96,6 +96,13 @@ class TestClass < Test::Unit::TestCase
def test_superclass_of_basicobject
assert_equal(nil, BasicObject.superclass)
+
+ assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}")
+ begin;
+ module Mod end
+ BasicObject.include(Mod)
+ assert_equal(nil, BasicObject.superclass)
+ end;
end
def test_module_function
@@ -782,15 +789,15 @@ class TestClass < Test::Unit::TestCase
c.attached_object
end
- assert_raise_with_message(TypeError, /`NilClass' is not a singleton class/) do
+ assert_raise_with_message(TypeError, /'NilClass' is not a singleton class/) do
nil.singleton_class.attached_object
end
- assert_raise_with_message(TypeError, /`FalseClass' is not a singleton class/) do
+ assert_raise_with_message(TypeError, /'FalseClass' is not a singleton class/) do
false.singleton_class.attached_object
end
- assert_raise_with_message(TypeError, /`TrueClass' is not a singleton class/) do
+ assert_raise_with_message(TypeError, /'TrueClass' is not a singleton class/) do
true.singleton_class.attached_object
end
end