summaryrefslogtreecommitdiff
path: root/bootstraptest/test_objectspace.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-01 06:17:50 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-01 06:17:50 +0000
commit7d0787116d9aca851422acbc59c6488fff65850c (patch)
tree727aec13ad6843f89c289a0cd26b9168ce9ebfff /bootstraptest/test_objectspace.rb
parent014d1ae20d939d2d522634ad54cc20036253314b (diff)
* gc.c (id2ref): T_VALUES is less than T_BLOCK. [ruby-dev:31911]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_objectspace.rb')
-rw-r--r--bootstraptest/test_objectspace.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/bootstraptest/test_objectspace.rb b/bootstraptest/test_objectspace.rb
new file mode 100644
index 0000000..f138ac5
--- /dev/null
+++ b/bootstraptest/test_objectspace.rb
@@ -0,0 +1,13 @@
+assert_normal_exit %q{
+ eval("", TOPLEVEL_BINDING)
+ minobj = ObjectSpace.to_enum(:each_object).min_by {|a| a.object_id }
+ maxobj = ObjectSpace.to_enum(:each_object).max_by {|a| a.object_id }
+ minobj.object_id.upto(maxobj.object_id) {|id|
+ begin
+ o = ObjectSpace._id2ref(id)
+ rescue RangeError
+ next
+ end
+ o.inspect if defined?(o.inspect)
+ }
+}, '[ruby-dev:31911]'