Skip to content

Commit 85fe1e0

Browse files
fizxbmizerany
authored andcommitted
fix bug in limited walks
1 parent 7dc2720 commit 85fe1e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: lib/fraggle/client.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,10 @@ def walk(rev, path, off=0, lim=MaxInt64, ents=[], &blk)
119119
end
120120

121121
def all(m, rev, path, off, lim, ents=[], &blk)
122+
# We're decrementing lim as we go, so we need to return
123+
# the accumulated values
122124
if lim == 0
123-
cn.next_tick { blk.call([], nil) }
125+
cn.next_tick { blk.call(ents, nil) }
124126
return
125127
end
126128

0 commit comments

Comments
 (0)