lib/execjs/external_runtime.rb in execjs-2.0.0 vs lib/execjs/external_runtime.rb in execjs-2.0.1
- old
+ new
@@ -14,10 +14,10 @@
def eval(source, options = {})
source = encode(source)
if /\S/ =~ source
- exec("return eval(#{::JSON.dump("(#{source})")})")
+ exec("return eval(#{::JSON.generate("(#{source})", :quirks_mode => true)})")
end
end
def exec(source, options = {})
source = encode(source)