From a0d234cdb9d6d4aa1247c170e8c16193ea25f12f Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Thu, 1 Jun 2023 17:11:21 +0900 Subject: [PATCH] Skip `eval code@` line thrown by Apple JavaScriptCore This fixes CI failures on macos: https://github.com/rails/execjs/actions/runs/5141287879/jobs/9253613193 --- lib/execjs/external_runtime.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/execjs/external_runtime.rb b/lib/execjs/external_runtime.rb index 8e49a25..798d809 100644 --- a/lib/execjs/external_runtime.rb +++ b/lib/execjs/external_runtime.rb @@ -78,7 +78,7 @@ def extract_result(output, filename) .sub(filename, "(execjs)") .strip end - stack.reject! { |line| ["eval code", "eval@[native code]"].include?(line) } + stack.reject! { |line| ["eval code", "eval code@", "eval@[native code]"].include?(line) } stack.shift unless stack[0].to_s.include?("(execjs)") error_class = value =~ /SyntaxError:/ ? RuntimeError : ProgramError error = error_class.new(value)