instiki/vendor/rails/actionpack/test/testing_sandbox.rb

16 lines
274 B
Ruby
Raw Normal View History

2007-01-22 07:43:50 -06:00
module TestingSandbox
# Temporarily replaces KCODE for the block
def with_kcode(kcode)
if RUBY_VERSION < '1.9'
old_kcode, $KCODE = $KCODE, kcode
begin
yield
ensure
$KCODE = old_kcode
end
else
yield
2007-01-22 07:43:50 -06:00
end
end
end