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

12 lines
205 B
Ruby
Raw Normal View History

2007-01-22 14:43:50 +01:00
module TestingSandbox
# Temporarily replaces KCODE for the block
def with_kcode(kcode)
old_kcode, $KCODE = $KCODE, kcode
begin
yield
ensure
$KCODE = old_kcode
2007-01-22 14:43:50 +01:00
end
end
end