ruby-changes:58368
From: Nobuyoshi <ko1@a...>
Date: Wed, 23 Oct 2019 02:50:50 +0900 (JST)
Subject: [ruby-changes:58368] 601f1fb456 (master): Catch syntax error even if fatal
https://git.ruby-lang.org/ruby.git/commit/?id=601f1fb456 From 601f1fb456c291b5eb4d20e97d8b151bb04ffda2 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 23 Oct 2019 02:05:28 +0900 Subject: Catch syntax error even if fatal diff --git a/tool/lib/test/unit/assertions.rb b/tool/lib/test/unit/assertions.rb index 48ee458..e2b8658 100644 --- a/tool/lib/test/unit/assertions.rb +++ b/tool/lib/test/unit/assertions.rb @@ -359,6 +359,8 @@ EOT https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit/assertions.rb#L359 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) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/