diff options
author | francis <francis> | 2008-09-03 14:05:56 +0000 |
---|---|---|
committer | francis <francis> | 2008-09-03 14:05:56 +0000 |
commit | 3823e5cbc642d95a17fdb316736e7afe6334140c (patch) | |
tree | aaa186d9fc8fead8d777c78b98de87c02fc18ca2 /vendor/rails-2.1.0/actionpack/test/testing_sandbox.rb | |
parent | af7a374ae63935168df2bbc02288f54f52c701a5 (diff) |
Rails 2.1.0
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 |