lib/redis_failover/node.rb in redis_failover-0.7.0 vs lib/redis_failover/node.rb in redis_failover-0.8.0

- old
+ new

@@ -80,11 +80,11 @@ def to_s "#{@host}:#{@port}" end def ==(other) - return false unless other.is_a?(Node) + return false unless Node === other return true if self.equal?(other) [host, port] == [other.host, other.port] end alias_method :eql?, :== @@ -130,16 +130,16 @@ Timeout.timeout(MAX_OP_WAIT_TIME) do redis = new_client yield redis end rescue - raise NodeUnavailableError.new(self) + raise NodeUnavailableError, self, caller ensure if redis begin redis.client.disconnect rescue - raise NodeUnavailableError.new(self) + raise NodeUnavailableError, self, caller end end end end end