1
0
Fork 0
mirror of https://github.com/rails/execjs synced 2023-03-27 23:21:20 -04:00
This commit is contained in:
Sam Stephenson 2011-08-01 23:13:56 -05:00
parent 4beea9628a
commit 8deaaf16a8

View file

@ -7,7 +7,7 @@ module ExecJS
end
def exec(source, options = {})
souce = source.encode('UTF-8') if source.respond_to?(:encode)
source = source.encode('UTF-8') if source.respond_to?(:encode)
if /\S/ =~ source
eval "(function(){#{source}})()", options
@ -15,7 +15,7 @@ module ExecJS
end
def eval(source, options = {})
souce = source.encode('UTF-8') if source.respond_to?(:encode)
source = source.encode('UTF-8') if source.respond_to?(:encode)
if /\S/ =~ source
unbox @runtime.evaluate("(#{source})")