diff options
Diffstat (limited to 'test/ruby/test_objectspace.rb')
-rw-r--r-- | test/ruby/test_objectspace.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_objectspace.rb b/test/ruby/test_objectspace.rb index e0f9eecd11..3c912fe300 100644 --- a/test/ruby/test_objectspace.rb +++ b/test/ruby/test_objectspace.rb @@ -65,6 +65,11 @@ End assert_raise_with_message(TypeError, msg) {ObjectSpace._id2ref(Object.new)} end + def test_id2ref_invalid_symbol_id + msg = /is not symbol id value/ + assert_raise_with_message(RangeError, msg) { ObjectSpace._id2ref(:a.object_id + 40) } + end + def test_count_objects h = {} ObjectSpace.count_objects(h) |