aboutsummaryrefslogblamecommitdiffstats
path: root/actionpack/test/testing_sandbox.rb
blob: b3b8b0f4d46cba3fdf3456f0b3c5f1e6456115dd (plain) (tree)
1
2
3
4
5
6
7
8
9
                     






                                            
       
     
   
module TestingSandbox
  # Temporarily replaces KCODE for the block
  def with_kcode(kcode)
    old_kcode, $KCODE = $KCODE, kcode
    begin
      yield
    ensure
      $KCODE = old_kcode
    end
  end
end