1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Added assertions

This commit is contained in:
Nobuyoshi Nakada 2020-11-19 15:41:38 +09:00
parent 9c1e2a99fc
commit 44ad72fa21
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -103,13 +103,13 @@ class TestISeq < Test::Unit::TestCase
f.puts "{ '\u00de' => 'Th', '\u00df' => 'ss', '\u00e0' => 'a' }"
f.close
previous_external = Encoding.default_external
Encoding.default_external = Encoding::US_ASCII
begin
load f.path
RubyVM::InstructionSequence.compile_file(f.path)
ensure
Encoding.default_external = previous_external
EnvUtil.with_default_external(Encoding::US_ASCII) do
assert_warn('') {
load f.path
}
assert_nothing_raised(SyntaxError) {
RubyVM::InstructionSequence.compile_file(f.path)
}
end
end
end