1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

one fewer is_a check

This commit is contained in:
Aaron Patterson 2014-05-25 14:04:08 -07:00
parent 8a51ec0158
commit c1bc70e229

View file

@ -14,11 +14,10 @@ module ActionDispatch
def rack_app(app = self.app) def rack_app(app = self.app)
@rack_app ||= begin @rack_app ||= begin
app = app.app endpoint = app.app
class_name = app.class.name.to_s
if ActionDispatch::Routing::Redirect === app || class_name !~ /^ActionDispatch::Routing/ if ActionDispatch::Routing::Redirect === endpoint || !app.dispatcher?
app endpoint
end end
end end
end end