From 3823e5cbc642d95a17fdb316736e7afe6334140c Mon Sep 17 00:00:00 2001 From: francis Date: Wed, 3 Sep 2008 14:05:56 +0000 Subject: Rails 2.1.0 --- vendor/rails-2.1.0/actionpack/test/testing_sandbox.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 vendor/rails-2.1.0/actionpack/test/testing_sandbox.rb (limited to 'vendor/rails-2.1.0/actionpack/test/testing_sandbox.rb') 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 -- cgit v1.2.3