There was an error while loading. Please reload this page.
1 parent fb1bfed commit 3529139Copy full SHA for 3529139
1 file changed
sentry-rails/lib/sentry/rails/railtie.rb
@@ -4,6 +4,20 @@
4
require "sentry/rails/rescued_exception_interceptor"
5
require "sentry/rails/backtrace_cleaner"
6
7
+if RUBY_ENGINE == "jruby" && RUBY_VERSION >= "3.4"
8
+ class ActionDispatch::MiddlewareStack::Middleware
9
+ def build(app)
10
+ if klass == ActionDispatch::RequestId && args[0].is_a?(Hash)
11
+ klass.new(app, **(args[0]))
12
+ elsif klass == ActionDispatch::Static && args.last.is_a?(Hash) && args.size == 2
13
+ klass.new(app, args[0], **(args[1]))
14
+ else
15
+ klass.new(app, *args, &block)
16
+ end
17
18
19
+end
20
+
21
module Sentry
22
class Railtie < ::Rails::Railtie
23
# middlewares can't be injected after initialize
0 commit comments