Permalink
Browse files

[Query] Iterable.any() was broken. It's consuming an extra value, whi…

…ch disappears when we read the stream. Make this problem go away when we don't have a predicate, and put in a TODO note to properly fix it later
  • Loading branch information...
Whiteknight committed Jul 3, 2012
1 parent d1d391f commit dd456833bc856b133ca384eea91330ccc7b7cb0f
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/query/Iterable.winxed
@@ -337,8 +337,10 @@ class Rosella.Query.Iterable : Rosella.IteratorBase
{
if (!self.has_more())
return false;
- :(var v, int m) = self.next_and_more();
if (f != null) {
+ // TODO: This is broken. We're consuming v and not saving it. Next
+ // time we try to read, we're going to be missing a value.
+ :(var v, int m) = self.next_and_more();
if (f(v))
return true;
while (m == true) {

0 comments on commit dd45683

Please sign in to comment.