Skip to content

Commit e6a2085

Browse files
committed
[fix] Correct rack extension logic to support JRuby 10 alongside 9.3/9.4
1 parent 0e87775 commit e6a2085

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/main/ruby/jruby/rack/rack_ext.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@ def render(path, params={})
3838
end
3939
end
4040

41-
if JRUBY_VERSION >= '9.4'
42-
::Rack::Request::Helpers.module_eval do
43-
include ::JRuby::Rack::RackExt::RequestHelpers
44-
end
45-
else
41+
if JRUBY_VERSION.start_with?("9.3")
4642
::Rack::Request.module_eval do
4743
include ::JRuby::Rack::RackExt::RequestHelpers
4844
end
4945

5046
::ActionDispatch::Request.module_eval do
5147
include ::JRuby::Rack::RackExt::RequestHelpers
5248
end if defined?(::ActionDispatch::Request)
49+
else
50+
::Rack::Request::Helpers.module_eval do
51+
include ::JRuby::Rack::RackExt::RequestHelpers
52+
end
5353
end
5454
end
5555
end

0 commit comments

Comments
 (0)