Skip to content

Commit 9fd9b3f

Browse files
Fix various test suite warnings relating to variable ambiguity and assigned but unused variables
1 parent ea89435 commit 9fd9b3f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/distributed_internals_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def test_colliding_node_ids
7272
nodes = ["redis://localhost:#{PORT}/15", "redis://localhost:#{PORT}/15", *NODES]
7373

7474
assert_raise(RuntimeError) do
75-
redis = Redis::Distributed.new nodes
75+
Redis::Distributed.new nodes
7676
end
7777
end
7878

test/lint/sorted_sets.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ def test_zadd
3939
# INCR option
4040
assert_equal 1.0, r.zadd("foo", 1, "s1", :incr => true)
4141
assert_equal 11.0, r.zadd("foo", 10, "s1", :incr => true)
42-
assert_equal -Infinity, r.zadd("bar", "-inf", "s1", :incr => true)
43-
assert_equal +Infinity, r.zadd("bar", "+inf", "s2", :incr => true)
42+
assert_equal(-Infinity, r.zadd("bar", "-inf", "s1", :incr => true))
43+
assert_equal(+Infinity, r.zadd("bar", "+inf", "s2", :incr => true))
4444
r.del "foo", "bar"
4545

4646
# Incompatible options combination
@@ -101,8 +101,8 @@ def test_variadic_zadd
101101
# INCR option
102102
assert_equal 1.0, r.zadd("foo", [1, "s1"], :incr => true)
103103
assert_equal 11.0, r.zadd("foo", [10, "s1"], :incr => true)
104-
assert_equal -Infinity, r.zadd("bar", ["-inf", "s1"], :incr => true)
105-
assert_equal +Infinity, r.zadd("bar", ["+inf", "s2"], :incr => true)
104+
assert_equal(-Infinity, r.zadd("bar", ["-inf", "s1"], :incr => true))
105+
assert_equal(+Infinity, r.zadd("bar", ["+inf", "s2"], :incr => true))
106106
assert_raise(Redis::CommandError) { r.zadd("foo", [1, "s1", 2, "s2"], :incr => true) }
107107
r.del "foo", "bar"
108108

0 commit comments

Comments
 (0)