Skip to content
This repository was archived by the owner on Apr 26, 2022. It is now read-only.

Commit 4b6d195

Browse files
jeffcarbsSimeon F. Willbanks
authored andcommitted
Fixes uninitialized constant Rack::Timeout::Error
ruby-openid#5 In an application where I'm using this gem, I'm also using the rack-timeout gem (https://github.com/kch/rack-timeout), so use of Timeout inside the Rack::OpenID class was finding Rack::Timeout, which is not the same. This commit updates references to Timeout to use the root namespace (::Timeout). Conflicts: lib/rack/openid.rb
1 parent bc97b65 commit 4b6d195

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rack/openid.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def begin_authentication(env, qs)
126126
add_oauth_fields(oidreq, params)
127127
url = open_id_redirect_url(req, oidreq, params["trust_root"], params["return_to"], params["method"], immediate)
128128
return redirect_to(url)
129-
rescue ::OpenID::OpenIDError, Timeout::Error => e
129+
rescue ::OpenID::OpenIDError, ::Timeout::Error => e
130130
env[RESPONSE] = MissingResponse.new
131131
return @app.call(env)
132132
end
@@ -270,7 +270,7 @@ def default_store
270270

271271
def timeout_protection_from_identity_server
272272
yield
273-
rescue Timeout::Error
273+
rescue ::Timeout::Error
274274
TimeoutResponse.new
275275
end
276276
end

0 commit comments

Comments
 (0)