root/branches/2-1-caching/actionpack/test/testing_sandbox.rb
| Revision 5288, 205 bytes (checked in by nzkoz, 2 years ago) |
|---|
| Line | |
|---|---|
| 1 | module TestingSandbox |
| 2 | # Temporarily replaces KCODE for the block |
| 3 | def with_kcode(kcode) |
| 4 | old_kcode, $KCODE = $KCODE, kcode |
| 5 | begin |
| 6 | yield |
| 7 | ensure |
| 8 | $KCODE = old_kcode |
| 9 | end |
| 10 | end |
| 11 | end |
Note: See TracBrowser for help on using the browser.