Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix for jruby 1.8 mode

  • Loading branch information...
commit f3b12493ff1030438fa6fc241ee6e4aa30ec8913 1 parent 9bf032c
@stereobooster stereobooster authored
Showing with 7 additions and 7 deletions.
  1. +1 −1  execjs.gemspec
  2. +6 −6 lib/execjs/ruby_rhino_runtime.rb
View
2  execjs.gemspec
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
s.add_development_dependency "mustang"
s.add_development_dependency "therubyracer"
else
- s.add_development_dependency "therubyrhino"
+ s.add_development_dependency "therubyrhino", ">=1.73.3"
end
s.authors = ["Sam Stephenson", "Josh Peek"]
View
12 lib/execjs/ruby_rhino_runtime.rb
@@ -23,7 +23,7 @@ def eval(source, options = {})
if /\S/ =~ source
unbox @rhino_context.eval("(#{source})")
end
- rescue ::Rhino::JavascriptError => e
+ rescue ::Rhino::JSError => e
if e.message == "syntax error"
raise RuntimeError, e.message
else
@@ -33,7 +33,7 @@ def eval(source, options = {})
def call(properties, *args)
unbox @rhino_context.eval(properties).call(*args)
- rescue ::Rhino::JavascriptError => e
+ rescue ::Rhino::JSError => e
if e.message == "syntax error"
raise RuntimeError, e.message
else
@@ -42,13 +42,13 @@ def call(properties, *args)
end
def unbox(value)
- case value = ::Rhino::To.ruby(value)
- when ::Rhino::NativeFunction
+ case value = ::Rhino::to_ruby(value)
+ when Java::OrgMozillaJavascript::NativeFunction
nil
- when ::Rhino::NativeObject
+ when Java::OrgMozillaJavascript::NativeObject
value.inject({}) do |vs, (k, v)|
case v
- when ::Rhino::NativeFunction, ::Rhino::J::Function
+ when Java::OrgMozillaJavascript::NativeFunction, ::Rhino::JS::Function
nil
else
vs[k] = unbox(v)
Please sign in to comment.
Something went wrong with that request. Please try again.