diff options
Diffstat (limited to 'vendor/rails-2.1.0/actionpack/test/testing_sandbox.rb')
-rw-r--r-- | vendor/rails-2.1.0/actionpack/test/testing_sandbox.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vendor/rails-2.1.0/actionpack/test/testing_sandbox.rb b/vendor/rails-2.1.0/actionpack/test/testing_sandbox.rb new file mode 100644 index 000000000..c36585104 --- /dev/null +++ b/vendor/rails-2.1.0/actionpack/test/testing_sandbox.rb @@ -0,0 +1,15 @@ +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 + end + end +end |