diff options
author | NARUSE, Yui <naruse@airemix.jp> | 2021-02-02 19:09:40 +0900 |
---|---|---|
committer | NARUSE, Yui <naruse@airemix.jp> | 2021-02-02 19:09:40 +0900 |
commit | 71b4638ca29a5d8a7d6f72e453513035d2096f47 (patch) | |
tree | 7feee157dc3a6429beba070577273e99dd6ff29d /test/objspace | |
parent | e9843cdaee26387310384fa0a1d43d450b017350 (diff) |
merge revision(s) 1cdae49d39fbaef654df487f168d1fb14a146d59: [Backport #17577]
Implement NameError::message#clone for Ractor
---
bootstraptest/test_ractor.rb | 13 +++++++++++++
error.c | 35 +++++++++++++++++++++++++++++++++--
test/objspace/test_objspace.rb | 9 +++++++++
3 files changed, 55 insertions(+), 2 deletions(-)
Diffstat (limited to 'test/objspace')
-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) |