1
0
Fork 0
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:
Joshua Peek 2013-09-27 15:32:24 -04:00
parent 5b940f9e28
commit fcc54cefee

View file

@ -59,7 +59,7 @@ module ExecJS
end end
def extract_result(output) def extract_result(output)
status, value = output.empty? ? [] : ::JSON.load(output) status, value = output.empty? ? [] : ::JSON.parse(output, :create_additions => false)
if status == "ok" if status == "ok"
value value
elsif value =~ /SyntaxError:/ elsif value =~ /SyntaxError:/