diff options
author | Nobuyoshi Nakada <[email protected]> | 2022-01-17 01:56:31 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2022-01-17 21:23:40 +0900 |
commit | f3c77bd480834f2835fe6fef5c0475336248dbde (patch) | |
tree | 4ffa71dadd225ff542307c8775b900b28521c153 /test/ruby/test_module.rb | |
parent | e53962b9e1c9ee6ea52b43ce19f5c82cc74494f8 (diff) |
Fix the placeholder subclass entry skipping [Bug #18489]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5455
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r-- | test/ruby/test_module.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 0a6959c5e6..e744121718 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -475,6 +475,15 @@ class TestModule < Test::Unit::TestCase assert_not_include(mod.ancestor_list, BasicObject) end + def test_module_collected_extended_object + m1 = labeled_module("m1") + m2 = labeled_module("m2") + Object.new.extend(m1) + GC.start + m1.include(m2) + assert_equal([m1, m2], m1.ancestors) + end + def test_dup OtherSetup.call |