diff --git a/lib/fraggle/client.rb b/lib/fraggle/client.rb index 76b9265..664e111 100644 --- a/lib/fraggle/client.rb +++ b/lib/fraggle/client.rb @@ -121,8 +121,10 @@ def walk(rev, path, off=0, lim=MaxInt64, ents=[], &blk) end def all(m, rev, path, off, lim, ents=[], &blk) + # We're decrementing lim as we go, so we need to return + # the accumulated values if lim == 0 - cn.next_tick { blk.call([], nil) } + cn.next_tick { blk.call(ents, nil) } return end