mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-21 09:40:13 +01:00
11 lines
205 B
Ruby
11 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
|