mirror of
https://github.com/rails/execjs
synced 2023-03-27 23:21:20 -04:00
Use JSON parse over load
This commit is contained in:
parent
5b940f9e28
commit
fcc54cefee
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ module ExecJS
|
|||
end
|
||||
|
||||
def extract_result(output)
|
||||
status, value = output.empty? ? [] : ::JSON.load(output)
|
||||
status, value = output.empty? ? [] : ::JSON.parse(output, :create_additions => false)
|
||||
if status == "ok"
|
||||
value
|
||||
elsif value =~ /SyntaxError:/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue