Skip to content

Commit

Permalink
fix add_namespace methods in case of nested array args
Browse files Browse the repository at this point in the history
  • Loading branch information
lastcat committed Oct 12, 2015
1 parent 4479a96 commit 517a17c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/redis/namespace.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'redis'
require 'redis/namespace/version'
#require "pry-byebug"

class Redis
class Namespace
Expand Down Expand Up @@ -366,6 +367,7 @@ def call_with_namespace(command, *args, &block)
# Add the namespace to any parameters that are keys.
case before
when :first
args.flatten!
args[0] = add_namespace(args[0]) if args[0]
when :all
args = add_namespace(args)
Expand Down

0 comments on commit 517a17c

Please sign in to comment.