diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-10-23 02:05:28 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-10-23 02:05:28 +0900 |
commit | 601f1fb456c291b5eb4d20e97d8b151bb04ffda2 (patch) | |
tree | 5ef1365dc6d9a70bca9e27e4f12f4c31fa30aed6 /tool/lib | |
parent | afab8122c339586ccb120861cc700aa8eee7402c (diff) | |
download | ruby-601f1fb456c291b5eb4d20e97d8b151bb04ffda2.tar.gz |
Catch syntax error even if fatal
Diffstat (limited to 'tool/lib')
-rw-r--r-- | tool/lib/test/unit/assertions.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tool/lib/test/unit/assertions.rb b/tool/lib/test/unit/assertions.rb index 48ee458b34..e2b865899a 100644 --- a/tool/lib/test/unit/assertions.rb +++ b/tool/lib/test/unit/assertions.rb @@ -359,6 +359,8 @@ EOT code = code.dup.force_encoding(Encoding::UTF_8) RubyVM::InstructionSequence.compile(code, fname, fname, line) :ok + ensure + raise if SyntaxError === $! end else def syntax_check(code, fname, line) |