From b11f238a811513b31c4f65c822370ac470f438dc Mon Sep 17 00:00:00 2001 From: nagachika Date: Sat, 12 Aug 2023 13:51:03 +0900 Subject: merge revision(s) 72d1a790cfe0e4a457db98c587f1acaa5e39f001: [Backport #19833] [Bug #19833] Fix index underflow at superclasses of `BasicObject` --- object.c | 4 ++++ test/ruby/test_class.rb | 7 +++++++ 2 files changed, 11 insertions(+) --- test/ruby/test_class.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb index 5086e60398..300ab950ac 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 -- cgit v1.2.3