mirror of
https://github.com/rails/execjs
synced 2023-03-27 23:21:20 -04:00
fix for jruby-head
This commit is contained in:
parent
0b0b5690d1
commit
a0ab2e9f96
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ module ExecJS
|
|||
unbox @rhino_context.eval("(#{source})")
|
||||
end
|
||||
rescue ::Rhino::JSError => e
|
||||
if e.message == "syntax error"
|
||||
if e.message =~ /^syntax error/
|
||||
raise RuntimeError, e.message
|
||||
else
|
||||
raise ProgramError, e.message
|
||||
|
|
Loading…
Reference in a new issue