Skip to content

Commit 0c66db2

Browse files
committed
Remove Future#==
1 parent 7f20192 commit 0c66db2

File tree

3 files changed

+1
-19
lines changed

3 files changed

+1
-19
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Removed `reconnect_delay_max` and `reconnect_delay`, you can pass precise sleep durations to `reconnect_attempts` instead.
88
- Require Ruby 2.5+.
99
- Removed the deprecated `queue` and `commit` methods. Use `pipelined` instead.
10+
- Removed the deprecated `Redis::Future#==`.
1011
- Removed the deprecated `pipelined` and `multi` signature. Commands now MUST be called on the block argument, not the original redis instance.
1112
- Removed `Redis.current`. You shouldn't assume there is a single global Redis connection, use a connection pool instead,
1213
and libaries using Redis should accept a Redis instance (or connection pool) as a config. E.g. `MyLibrary.redis = Redis.new(...)`.

lib/redis/pipeline.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,6 @@ def initialize(command, coerce)
8585
@coerce = coerce
8686
end
8787

88-
def ==(_other)
89-
message = +"The methods == and != are deprecated for Redis::Future and will be removed in 5.0.0"
90-
message << " - You probably meant to call .value == or .value !="
91-
message << " (#{::Kernel.caller(1, 1).first})\n"
92-
93-
::Redis.deprecate!(message)
94-
95-
super
96-
end
97-
9888
def inspect
9989
"<Redis::Future #{@command.inspect}>"
10090
end

test/redis/pipelining_commands_test.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,6 @@ def test_futures_raise_when_command_errors_and_needs_transformation
135135
end
136136
end
137137

138-
def test_futures_warn_when_tested_for_equality
139-
r.pipelined do |p|
140-
@result = p.sadd("foo", 1)
141-
end
142-
143-
Redis.expects(:deprecate!).once
144-
@result == 1
145-
end
146-
147138
def test_futures_can_be_identified
148139
r.pipelined do |p|
149140
@result = p.sadd("foo", 1)

0 commit comments

Comments
 (0)