<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>bin/distredis</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -62,7 +62,7 @@ end
 
 if __FILE__ == $0
 
-r = DistRedis.new 'localhost:6379', 'localhost:6380', 'localhost:6381'
+r = DistRedis.new 'localhost:6379', 'localhost:6380', 'localhost:6381', 'localhost:6382'
   r['urmom'] = 'urmom'
   r['urdad'] = 'urdad'
   r['urmom1'] = 'urmom1'
@@ -97,48 +97,6 @@ r = DistRedis.new 'localhost:6379', 'localhost:6380', 'localhost:6381'
   r.ring.nodes.each do |red|
     p [red.port, red.keys(&quot;*&quot;)]
   end
-  
-  p r.keys('*')
-  
-  r.add_server 'localhost:6382'
-  
-  r['urmom'] = 'urmom'
-  r['urdad'] = 'urdad'
-  r['urmom1'] = 'urmom1'
-  r['urdad1'] = 'urdad1'
-  r['urmom2'] = 'urmom2'
-  r['urdad2'] = 'urdad2'
-  r['urmom3'] = 'urmom3'
-  r['urdad3'] = 'urdad3'
-  p r['urmom']
-  p r['urdad']
-  p r['urmom1']
-  p r['urdad1']
-  p r['urmom2']
-  p r['urdad2']
-  p r['urmom3']
-  p r['urdad3']
-  
-  r.push_tail 'listor', 'foo1'
-  r.push_tail 'listor', 'foo2'
-  r.push_tail 'listor', 'foo3'
-  r.push_tail 'listor', 'foo4'
-  r.push_tail 'listor', 'foo5'
-  
-  p r.pop_tail 'listor'
-  p r.pop_tail 'listor'
-  p r.pop_tail 'listor'
-  p r.pop_tail 'listor'
-  p r.pop_tail 'listor'
-  
-  puts &quot;key distribution:&quot;
-  
-  r.ring.nodes.each do |red|
-    p [red.port, red.keys(&quot;*&quot;)]
-  end
-  
-  p r.keys('*')
-  
   r.delete_cloud!
   p r.keys('*')
 </diff>
      <filename>lib/dist_redis.rb</filename>
    </modified>
    <modified>
      <diff>@@ -245,6 +245,17 @@ class Redis
     bulk_reply
   end
   
+  # LSET key index value
+  # Time complexity: O(N) (with N being the length of the list)
+  # Set the list element at index (see LINDEX for information about the index argument) with the new value. Out of range indexes will generate an error. Note that setting the first or last elements of the list is O(1).
+  # 
+  # Return value: status code reply
+  def list_set(key, index, val)
+    write &quot;LSET #{key} #{index} #{val.to_s.size}\r\n#{val}\r\n&quot;
+    status_code_reply
+  end
+  
+  
   # LLEN key
   # Time complexity: O(1)
   # Return the length of the list stored at the specified key. If the key does not </diff>
      <filename>lib/redis.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>98d287d90d86842c39e09beac80bd19989b02dc2</id>
    </parent>
  </parents>
  <author>
    <name>Ezra Zygmuntowicz</name>
    <email>ez@engineyard.com</email>
  </author>
  <url>http://github.com/brynary/redis-rb/commit/6ccfb1bb396eb679fa92e073b70a006c82146174</url>
  <id>6ccfb1bb396eb679fa92e073b70a006c82146174</id>
  <committed-date>2009-03-01T12:26:00-08:00</committed-date>
  <authored-date>2009-03-01T12:26:00-08:00</authored-date>
  <message>implement and spec LSET for setting a single element of a list value at an index</message>
  <tree>3d7709c1fa30a41aff002b2ac40220222959c299</tree>
  <committer>
    <name>Ezra Zygmuntowicz</name>
    <email>ez@engineyard.com</email>
  </committer>
</commit>
