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)