mirror of
https://github.com/rails/execjs
synced 2023-03-27 23:21:20 -04:00
Fix typo
This commit is contained in:
parent
4beea9628a
commit
8deaaf16a8
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ module ExecJS
|
||||||
end
|
end
|
||||||
|
|
||||||
def exec(source, options = {})
|
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
|
if /\S/ =~ source
|
||||||
eval "(function(){#{source}})()", options
|
eval "(function(){#{source}})()", options
|
||||||
|
@ -15,7 +15,7 @@ module ExecJS
|
||||||
end
|
end
|
||||||
|
|
||||||
def eval(source, options = {})
|
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
|
if /\S/ =~ source
|
||||||
unbox @runtime.evaluate("(#{source})")
|
unbox @runtime.evaluate("(#{source})")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue