test/test_utils.rb in tzinfo-0.3.12 vs test/test_utils.rb in tzinfo-0.3.13
- old
+ new
@@ -7,6 +7,15 @@
yield
ensure
$-v = old_verbose
end
end
+
+ def safe_test(level = 1)
+ thread = Thread.new do
+ $SAFE = level
+ yield
+ end
+
+ thread.join
+ end
end
\ No newline at end of file