41c3623524
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5288 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
12 lines
205 B
Ruby
12 lines
205 B
Ruby
module TestingSandbox
|
|
# Temporarily replaces KCODE for the block
|
|
def with_kcode(kcode)
|
|
old_kcode, $KCODE = $KCODE, kcode
|
|
begin
|
|
yield
|
|
ensure
|
|
$KCODE = old_kcode
|
|
end
|
|
end
|
|
end
|