From 40bd2fd1d2374f61aa6842bbf75b1d1840c0e340 Mon Sep 17 00:00:00 2001 From: Patrick Chieppe Date: Thu, 14 Nov 2024 18:15:02 +1100 Subject: [PATCH] Add missing return --- lib/mock_redis/list_methods.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/mock_redis/list_methods.rb b/lib/mock_redis/list_methods.rb index 57f2347..412bbdf 100644 --- a/lib/mock_redis/list_methods.rb +++ b/lib/mock_redis/list_methods.rb @@ -108,9 +108,11 @@ def lmpop(*keys, **options) record_count = llen(key) next if record_count.zero? - [count, record_count].min.times.map do + values = [count, record_count].min.times.map do modifier == 'left' ? with_list_at(key, &:shift) : with_list_at(key, &:pop) end + + return [key, values] end nil