summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-08-08 19:03:38 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-08-08 19:03:38 +0900
commit72d1a790cfe0e4a457db98c587f1acaa5e39f001 (patch)
tree1c3429801afd1f8699eab29f61fe54f4695db41e /test/ruby
parent69292676a25a0e4bf1e80065737ad5cb42122c2a (diff)
[Bug #19833] Fix index underflow at superclasses of `BasicObject`
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/8185
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_class.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb
index 98acbaf67b..a8a019cee2 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