diff options
Diffstat (limited to 'test/objspace/test_objspace.rb')
-rw-r--r-- | test/objspace/test_objspace.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb index 230c1d0513..6b956e6d14 100644 --- a/test/objspace/test_objspace.rb +++ b/test/objspace/test_objspace.rb @@ -528,6 +528,15 @@ class TestObjSpace < Test::Unit::TestCase children.each {|child| ObjectSpace.internal_class_of(child).itself} # this used to crash end + def test_name_error_message + begin + bar + rescue => err + _, m = ObjectSpace.reachable_objects_from(err) + end + assert_equal(m, m.clone) + end + def traverse_super_classes klass while klass klass = ObjectSpace.internal_super_of(klass) |