Here's some code:

```
i = 0
collection = []
loop do
  i += 1
  break if complicated_predicate_of(i)
  collection << i
end
collection

```

I don't know in advance how many times I'll need to iterate; that depends on `complicated_predicate_of(i)`. I could do something like `0.upto(Float::INFINITY).times.collect do ... end` but that's pretty ugly.

I'd like to do this:

```
i = 0
collection = loop.collect do
  i += 1
  break if complicated_predicate_of(i)
  i
end

```

But, though it's not a syntax error for some reason, `loop.collect` doesn't seem to collect anything. (Neither does `loop.reduce`). `collection` is nil at the end of the statement.

In other words, I want to collect the values of a `loop` statement without an explicit iterator. Is there some way to achieve this?