summaryrefslogtreecommitdiff
path: root/test/ruby/test_objectspace.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_objectspace.rb')
-rw-r--r--test/ruby/test_objectspace.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/ruby/test_objectspace.rb b/test/ruby/test_objectspace.rb
index 24a190b2df..a7cfb064a8 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 + GC::INTERNAL_CONSTANTS[:RVALUE_SIZE]) }
+ end
+
def test_count_objects
h = {}
ObjectSpace.count_objects(h)
@@ -219,7 +224,7 @@ End
assert_same(new_obj, found[0])
end
- def test_each_object_no_gabage
+ def test_each_object_no_garbage
assert_separately([], <<-End)
GC.disable
eval('begin; 1.times{}; rescue; ensure; end')