summaryrefslogtreecommitdiff
path: root/test/objspace
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-02-01 18:01:10 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-02-01 19:54:21 +0900
commit1cdae49d39fbaef654df487f168d1fb14a146d59 (patch)
tree93b08df3c82851092345cb2b4003c540268e5e55 /test/objspace
parent0dd38902b96e6062130080ab5b96098dedf71139 (diff)
downloadruby-1cdae49d39fbaef654df487f168d1fb14a146d59.tar.gz
Implement NameError::message#clone for Ractor
Diffstat (limited to 'test/objspace')
-rw-r--r--test/objspace/test_objspace.rb9
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)