antirez / redis-rb-cluster

Redis Cluster Ruby client based on redis-rb
249 stars 106 forks source link

Add support for array of arguments to `pfcount` #5

Closed ArunSakthivel closed 9 years ago

ArunSakthivel commented 9 years ago

I can't able to pass array of value as a argument to PFCOUNT

startup_nodes = [{ :host => '127.0.0.1', :port => 6379 },{ :host => '127.0.0.2', :port => 6379 }]
r = RedisCluster.new(startup_nodes,32,:timeout => 0.1)
r.pfcount(["foo", "bar"])

Error:

/home/rails/redis_cluster/crc16.rb:5:in `crc16': undefined method `each_byte' for #<Array:0x000000018cd830> (NoMethodError)
    from redis_cluster/cluster.rb:74:in `keyslot'
    from /home/rails/redis_cluster/cluster.rb:150:in `send_cluster_command'
    from /home/rails/redis_cluster/cluster.rb:187:in `method_missing'
    from connect_redis.rb:38:in `<main>'