summaryrefslogtreecommitdiff
path: root/test/ruby/test_objectspace.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_objectspace.rb')
-rw-r--r--test/ruby/test_objectspace.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_objectspace.rb b/test/ruby/test_objectspace.rb
index b701e0fc91..ec561bc405 100644
--- a/test/ruby/test_objectspace.rb
+++ b/test/ruby/test_objectspace.rb
@@ -149,5 +149,12 @@ End
}
assert(exist, 'Bug #11360')
End
+
+ klass = Class.new
+ instance = klass.new
+ sclass = instance.singleton_class
+ meta = klass.singleton_class
+ assert_kind_of(meta, sclass)
+ assert_include(ObjectSpace.each_object(meta).to_a, sclass)
end
end