From 601f1fb456c291b5eb4d20e97d8b151bb04ffda2 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 23 Oct 2019 02:05:28 +0900 Subject: [PATCH] Catch syntax error even if fatal --- tool/lib/test/unit/assertions.rb | 2 ++ 1 file changed, 2 insertions(+) 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)