projects
/
feedcatcher.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merged updates from trunk into stable branch
[feedcatcher.git]
/
vendor
/
rails
/
actionpack
/
test
/
testing_sandbox.rb
diff --git a/vendor/rails/actionpack/test/testing_sandbox.rb
b/vendor/rails/actionpack/test/testing_sandbox.rb
new file mode 100644
(file)
index 0000000..
c365851
--- /dev/null
+++ b/
vendor/rails/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