diff --git a/.travis.yml b/.travis.yml index d0cff2391..2c630af8d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,14 @@ notifications: on_failure: change matrix: + include: + - rvm: jruby-1.7.24 + env: JRUBY_OPTS="--2.0" + gemfile: gemfiles/rails42.gemfile + - rvm: jruby-9.0.5.0 + gemfile: gemfiles/rails42.gemfile + - rvm: jruby-9.0.5.0 + gemfile: gemfiles/rails5.gemfile allow_failures: - rvm: ruby-head exclude: diff --git a/lib/raven/integrations/rails.rb b/lib/raven/integrations/rails.rb index 428d4bae0..946e5d3c5 100644 --- a/lib/raven/integrations/rails.rb +++ b/lib/raven/integrations/rails.rb @@ -30,10 +30,10 @@ class Rails < ::Rails::Railtie exceptions_class = ::ActionDispatch::ShowExceptions end unless exceptions_class.nil? - if RUBY_VERSION.to_f < 2.0 - exceptions_class.send(:include, Raven::Rails::Middleware::OldDebugExceptionsCatcher) - else + if exceptions_class.respond_to?(:prepend, true) exceptions_class.send(:prepend, Raven::Rails::Middleware::DebugExceptionsCatcher) + else + exceptions_class.send(:include, Raven::Rails::Middleware::OldDebugExceptionsCatcher) end end end