mirror of
https://github.com/github/rails.git
synced 2026-01-15 01:28:17 -05:00
17 lines
319 B
Ruby
17 lines
319 B
Ruby
module ActiveModel #:nodoc:
|
|
class TestCase < ActiveSupport::TestCase #:nodoc:
|
|
def with_kcode(kcode)
|
|
if RUBY_VERSION < '1.9'
|
|
orig_kcode, $KCODE = $KCODE, kcode
|
|
begin
|
|
yield
|
|
ensure
|
|
$KCODE = orig_kcode
|
|
end
|
|
else
|
|
yield
|
|
end
|
|
end
|
|
end
|
|
end
|