diff --git a/lib/redis/client.rb b/lib/redis/client.rb index 801d0872d..7a5785aa5 100644 --- a/lib/redis/client.rb +++ b/lib/redis/client.rb @@ -41,7 +41,8 @@ def initialize(reply_type) MULTI_BULK_COMMANDS = { "mset" => true, "msetnx" => true, - "hset" => true + "hset" => true, + "hmset" => true } BOOLEAN_PROCESSOR = lambda{|r| r == 1 } diff --git a/test/redis_test.rb b/test/redis_test.rb index b1879cbd8..d505c6648 100644 --- a/test/redis_test.rb +++ b/test/redis_test.rb @@ -766,6 +766,13 @@ def redis.call_command(attrs) assert_equal({"f1" => "s1", "f2" => "s2"}, @r.hgetall("foo")) end + + test "HMSET" do + @r.hmset("hash", "foo1", "bar1", "foo2", "bar2") + + assert_equal "bar1", @r.hget("hash", "foo1") + assert_equal "bar2", @r.hget("hash", "foo2") + end end context "Sorting" do