From: antirez Date: Thu, 21 May 2009 11:51:30 +0000 (+0200) Subject: RubyRedis info postprocessor rewritten in a more functional way X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/f5bf7e3e30d2089704d8b0b5147bb1abd869ef0b?ds=sidebyside RubyRedis info postprocessor rewritten in a more functional way --- diff --git a/client-libraries/ruby_2/rubyredis.rb b/client-libraries/ruby_2/rubyredis.rb index 620bab17..42e77a08 100644 --- a/client-libraries/ruby_2/rubyredis.rb +++ b/client-libraries/ruby_2/rubyredis.rb @@ -31,8 +31,7 @@ class RedisClient "info" => lambda{|r| info = {} r.each_line {|kv| - k,v = kv.split(':', 2) - k,v = k.chomp, v = v.chomp + k,v = kv.split(":",2).map{|x| x.chomp} info[k.to_sym] = v } info