aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/envutil.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-06 01:44:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-06 01:44:38 +0000
commitc22b223cb0a48342cef7412e139313e60a913e71 (patch)
tree06e41261c0c6f831948fd8e4ed59494231f9eff8 /test/ruby/envutil.rb
parentf40d2c967005e49914046bbc6a7a8c06c46b1d38 (diff)
downloadruby-c22b223cb0a48342cef7412e139313e60a913e71.tar.gz
* array.c (rb_ary_product): need to set the length in order to get
the entries marked. [ruby-dev:41540] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/envutil.rb')
-rw-r--r--test/ruby/envutil.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb
index 1839ed6da5..1824e548ed 100644
--- a/test/ruby/envutil.rb
+++ b/test/ruby/envutil.rb
@@ -130,6 +130,14 @@ module EnvUtil
return stderr
end
module_function :verbose_warning
+
+ def under_gc_stress
+ stress, GC.stress = GC.stress, true
+ yield
+ ensure
+ GC.stress = stress
+ end
+ module_function :under_gc_stress
end
module Test