diff options
| author | nagachika <nagachika@ruby-lang.org> | 2023-08-12 13:51:03 +0900 |
|---|---|---|
| committer | nagachika <nagachika@ruby-lang.org> | 2023-08-12 13:51:03 +0900 |
| commit | b11f238a811513b31c4f65c822370ac470f438dc (patch) | |
| tree | 1927d8e27f3cbd4b5a9a586a87dd39dc0964bc35 /test/ruby | |
| parent | 3c9cb7031154b8666d600b0055ba868e18805dc8 (diff) | |
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(+)
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_class.rb | 7 |
1 files changed, 7 insertions, 0 deletions
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 |
