Skip to content

Commit 7bdd4ed

Browse files
committed
Use result instead of tap
1 parent a4c2838 commit 7bdd4ed

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/kredis/types/list.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ def set_default
4848
end
4949

5050
def with_expiration(&block)
51-
block.call.tap do
52-
if expires_in && ttl < 0
53-
expire expires_in.to_i
54-
end
51+
result = block.call
52+
if expires_in && ttl < 0
53+
expire expires_in.to_i
5554
end
55+
result
5656
end
5757
end

0 commit comments

Comments
 (0)