diff --git a/Gemfile b/Gemfile index a602f48..c65d6eb 100644 --- a/Gemfile +++ b/Gemfile @@ -14,5 +14,5 @@ group :test do else gem 'therubyrhino_jar', :path => '.' end - gem 'less', '>= 2.2.1' + gem 'less', '>= 2.2.1', :require => nil end \ No newline at end of file diff --git a/lib/rhino/error.rb b/lib/rhino/error.rb index 847fbff..a77cd07 100644 --- a/lib/rhino/error.rb +++ b/lib/rhino/error.rb @@ -25,7 +25,7 @@ module Rhino # #Rhino::JS::JavaScriptException instance. def cause return @cause if defined?(@cause) - if @native.respond_to?(:cause) + if @native.respond_to?(:cause) && @native.cause @native.cause else @native.is_a?(JS::RhinoException) ? @native : nil