From b5b4164967685cbd4a2058bfa203df543f714c2d Mon Sep 17 00:00:00 2001 From: Brian Kephart Date: Sun, 13 May 2018 16:44:20 -0500 Subject: [PATCH] replace `const_defined?` with `defined?` --- lib/rack/attack/store_proxy/redis_store_proxy.rb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/rack/attack/store_proxy/redis_store_proxy.rb b/lib/rack/attack/store_proxy/redis_store_proxy.rb index 1741b99..f9f2c5b 100644 --- a/lib/rack/attack/store_proxy/redis_store_proxy.rb +++ b/lib/rack/attack/store_proxy/redis_store_proxy.rb @@ -5,14 +5,7 @@ module Rack module StoreProxy class RedisStoreProxy < SimpleDelegator def self.handle?(store) - # Using const_defined? for now. - # - # Go back to use defined? once this ruby issue is - # fixed and released: - # https://bugs.ruby-lang.org/issues/14407 - # - # defined?(::Redis::Store) && store.is_a?(::Redis::Store) - const_defined?("::Redis::Store") && store.is_a?(::Redis::Store) + defined?(::Redis::Store) && store.is_a?(::Redis::Store) end def initialize(store)