diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-11-19 15:41:38 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-11-19 15:41:53 +0900 |
commit | 44ad72fa2113d0e111a1cf76327bcc13de8393e1 (patch) | |
tree | 6ca6570a043c164bf421e1895c72f71a3a1c99a5 /test | |
parent | 9c1e2a99fcf69c52fa1d8edcd5fe3961353233ab (diff) |
Added assertions
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_iseq.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index 3ec06b4042..78be07dc78 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -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 |