Methods
W
Instance Public methods
with_kcode(kcode)

Temporarily replaces KCODE for the block

# File actionpack/test/lib/testing_sandbox.rb, line 3
def with_kcode(kcode)
  if RUBY_VERSION < '1.9'
    old_kcode, $KCODE = $KCODE, kcode
    begin
      yield
    ensure
      $KCODE = old_kcode
    end
  else
    yield
  end
end