Skip to content

Commit 674541c

Browse files
committed
Add Redis#with
1 parent 5fb64bd commit 674541c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Unreleased
22

3+
* Add `Redis#with` for better compatibility with `connection_pool` usage.
34
* Fix the block form of `multi` called inside `pipelined`. Previously the `MUTLI/EXEC` wouldn't be sent. See #1073.
45

56
# 4.6.0

lib/redis.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ def close
111111
end
112112
alias disconnect! close
113113

114+
def with
115+
yield self
116+
end
117+
114118
# @deprecated Queues a command for pipelining.
115119
#
116120
# Commands in the queue are executed with the Redis#commit method.

0 commit comments

Comments
 (0)