diff options
author | Nobuyoshi Nakada <[email protected]> | 2021-02-01 18:01:10 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-02-01 19:54:21 +0900 |
commit | 1cdae49d39fbaef654df487f168d1fb14a146d59 (patch) | |
tree | 93b08df3c82851092345cb2b4003c540268e5e55 /test/objspace/test_objspace.rb | |
parent | 0dd38902b96e6062130080ab5b96098dedf71139 (diff) |
Implement NameError::message#clone for Ractor
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4142
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) |