aboutsummaryrefslogtreecommitdiffstats
path: root/bootstraptest/test_objectspace.rb
diff options
context:
space:
mode:
Diffstat (limited to 'bootstraptest/test_objectspace.rb')
-rw-r--r--bootstraptest/test_objectspace.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/bootstraptest/test_objectspace.rb b/bootstraptest/test_objectspace.rb
index f138ac5f6c..4f93341f72 100644
--- a/bootstraptest/test_objectspace.rb
+++ b/bootstraptest/test_objectspace.rb
@@ -11,3 +11,23 @@ assert_normal_exit %q{
o.inspect if defined?(o.inspect)
}
}, '[ruby-dev:31911]'
+
+assert_normal_exit %q{
+ ary = (1..10).to_a
+ ary.permutation(2) {|x|
+ if x == [1,2]
+ ObjectSpace.each_object(String) {|s|
+ s.clear if s.length == 40 || s.length == 80
+ }
+ end
+ }
+}, '[ruby-dev:31982]'
+
+assert_normal_exit %q{
+ ary = (1..100).to_a
+ ary.permutation(2) {|x|
+ if x == [1,2]
+ ObjectSpace.each_object(Array) {|o| o.clear if o == ary && o.object_id != ary.object_id }
+ end
+ }
+}, '[ruby-dev:31985]'