Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/kredis/migration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ def migrate(from:, to:, pipeline: nil)
def delete_all(*key_patterns)
log_migration "DELETE ALL #{key_patterns.inspect}" do
if key_patterns.length > 1
@redis.del *key_patterns
@redis.del(*key_patterns)
else
each_key_batch_matching(key_patterns.first) do |keys, pipeline|
pipeline.del *keys
pipeline.del(*keys)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/kredis/types/proxying.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Kredis::Types::Proxying
attr_accessor :proxy, :key

def self.proxying(*commands)
delegate *commands, to: :proxy
delegate(*commands, to: :proxy)
end

def initialize(redis, key, **options)
Expand Down
2 changes: 1 addition & 1 deletion lib/kredis/types/unique_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def append(elements)
multi do
remove elements
super
ltrim -limit, -1 if limit
ltrim(-limit, -1) if limit
end
end
alias << append
Expand Down
2 changes: 1 addition & 1 deletion test/migration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class MigrationTest < ActiveSupport::TestCase
test "delete_all with keys" do
3.times { |index| Kredis.proxy("mykey:#{index}").set "hello there #{index}" }

Kredis::Migration.delete_all *3.times.map { |index| "mykey:#{index}" }
Kredis::Migration.delete_all(*3.times.map { |index| "mykey:#{index}" })

3.times { |index| assert_nil Kredis.proxy("mykey:#{index}").get }
end
Expand Down