From 413e18a7a227b8cd4e8ed2c9882817ba71eec2ca Mon Sep 17 00:00:00 2001 From: Evan Phoenix Date: Thu, 17 May 2012 14:43:38 -0700 Subject: [PATCH] Keep things quacking the same --- lib/redis/client.rb | 4 ++-- lib/redis/pipeline.rb | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/redis/client.rb b/lib/redis/client.rb index a6789552f..7c83b163c 100644 --- a/lib/redis/client.rb +++ b/lib/redis/client.rb @@ -235,8 +235,8 @@ def with_reconnect(val=true) end end - def without_reconnect(val=true, &blk) - with_reconnect(!val, &blk) + def without_reconnect(&blk) + with_reconnect(false, &blk) end protected diff --git a/lib/redis/pipeline.rb b/lib/redis/pipeline.rb index cdd0ba309..eae0f4b2c 100644 --- a/lib/redis/pipeline.rb +++ b/lib/redis/pipeline.rb @@ -45,12 +45,12 @@ def commands @futures.map { |f| f._command } end - def with_reconnect(&block) - @with_reconnect = true + def with_reconnect(val=true) + @with_reconnect = val yield end - def without_reconnect(&block) + def without_reconnect @with_reconnect = false yield end