From eb139e31bb916d4ffc07e5c7fe88f88e9ce99bd6 Mon Sep 17 00:00:00 2001 From: hogelog Date: Fri, 23 Oct 2026 13:58:32 +0900 Subject: [PATCH 1/3] Drop quirks_mode from JSON calls in tests json 3.x no longer accepts the quirks_mode keyword, and json 2.x already handles top-level scalars without it. Co-Authored-By: Claude Opus 5.5 --- test/test_execjs.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_execjs.rb b/test/test_execjs.rb index 061e3cf..17a240a 100644 --- a/test/test_execjs.rb +++ b/test/test_execjs.rb @@ -170,10 +170,10 @@ def test_context_call_missing_function { 'a' => 1, 'b' => [2, 3] }, { 'a' => true } ].each_with_index do |value, index| - json_value = JSON.generate(value, quirks_mode: true) + json_value = JSON.generate(value) define_method("test_json_value_#{index}") do - assert_output value, JSON.parse(json_value, quirks_mode: true) + assert_output value, JSON.parse(json_value) end define_method("test_exec_value_#{index}") do From 0166cd4e68420d3f03890d21c3ce1f9ba947c6fd Mon Sep 17 00:00:00 2001 From: hogelog Date: Fri, 23 Oct 2026 14:33:17 +0900 Subject: [PATCH 2/3] Drop create_additions option from JSON.parse json 3.x removed the create_additions keyword, and the resulting ArgumentError was retried forever by JSRuntimeHandle#evaluate, hanging CI. JSON.parse never creates additions by default, so the option is redundant. Co-Authored-By: Claude Opus 5.5 --- lib/execjs/pcruntime/context_process_runtime.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/execjs/pcruntime/context_process_runtime.rb b/lib/execjs/pcruntime/context_process_runtime.rb index e968692..206c17e 100644 --- a/lib/execjs/pcruntime/context_process_runtime.rb +++ b/lib/execjs/pcruntime/context_process_runtime.rb @@ -221,7 +221,7 @@ def post_request(socket_path, path, content_type = nil, body = nil) result = URI.decode_www_form_component response.body if response.code == '200' - ::JSON.parse(result, create_additions: false) if /\S/.match?(result) + ::JSON.parse(result) if /\S/.match?(result) else # expects ErrorMessage\0StackTrace =~ response.body message, stack = result.split "\0" From cfd3f80dd1324c70ac84b8eaa6619984dd8ddec9 Mon Sep 17 00:00:00 2001 From: hogelog Date: Sat, 24 Oct 2026 16:13:13 +0900 Subject: [PATCH 3/3] Declare the json dependency The runtime requires json to decode responses from the Node.js process. It works with json 2.x and 3.x. Co-Authored-By: Claude Opus 5.5 --- execjs-pcruntime.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/execjs-pcruntime.gemspec b/execjs-pcruntime.gemspec index 75bb5f8..6ee04d9 100644 --- a/execjs-pcruntime.gemspec +++ b/execjs-pcruntime.gemspec @@ -14,6 +14,7 @@ Gem::Specification.new do |spec| spec.license = 'MIT' spec.add_dependency 'execjs', '~> 2.0' + spec.add_dependency 'json', '>= 2.0' # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host' # to allow pushing to a single host or delete this section to allow pushing to any host.