From 85a2968d7c244b0331c44c6a650e4fd992ec2bd7 Mon Sep 17 00:00:00 2001 From: Jeff Carbonella Date: Sun, 2 Feb 2014 22:45:37 -0500 Subject: [PATCH] Fixes uninitialized constant Rack::Timeout::Error 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). --- lib/rack/openid.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rack/openid.rb b/lib/rack/openid.rb index 3784498..9875aee 100644 --- a/lib/rack/openid.rb +++ b/lib/rack/openid.rb @@ -134,7 +134,7 @@ def begin_authentication(env, qs) url = open_id_redirect_url(req, oidreq, params) return redirect_to(url) - rescue ::OpenID::OpenIDError, Timeout::Error => e + rescue ::OpenID::OpenIDError, ::Timeout::Error => e env[RESPONSE] = MissingResponse.new return @app.call(env) end @@ -302,7 +302,7 @@ def default_store def timeout_protection_from_identity_server yield - rescue Timeout::Error + rescue ::Timeout::Error TimeoutResponse.new end end