discourse/lib/freedom_patches/redis.rb

15 lines
340 B
Ruby
Raw Normal View History

2016-04-01 05:33:25 +08:00
# https://github.com/redis/redis-rb/pull/591
class Redis
class Client
alias_method :old_initialize, :initialize
def initialize(options = {})
old_initialize(options)
if options.include?(:connector) && options[:connector].is_a?(Class)
@connector = options[:connector].new(@options)
end
end
end
end