1
0
Fork 0
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:
stereobooster 2012-05-15 17:20:06 +03:00
parent 0b0b5690d1
commit a0ab2e9f96

View file

@ -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