Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions execjs-pcruntime.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/execjs/pcruntime/context_process_runtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions test/test_execjs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading