Upgraded Rails
[monkeycharger.git] / vendor / rails / actionpack / test / testing_sandbox.rb
blobb3b8b0f4d46cba3fdf3456f0b3c5f1e6456115dd
1 module TestingSandbox
2   # Temporarily replaces KCODE for the block
3   def with_kcode(kcode)
4     old_kcode, $KCODE = $KCODE, kcode
5     begin
6       yield
7     ensure
8       $KCODE = old_kcode
9     end
10   end
11 end