Open jtara opened 9 years ago
I think it may be related to this:
https://www.ruby-forum.com/topic/196086
That's a discussion about jRuby. But it mentions an implementation detail of #next
:
- On the first call to #next, a fiber or generator is spun up to start the call to each, similar to this: f = Fiber.new { collection.each {|i| Fiber.yield i} }
- For each element next returns, the fiber/generator is invoked to produce the next result def next f.resume end
- When the enumeration completes (or at any time) you can rewind and start from the beginning.
I'd guess that Rhodes doesn't implement Fibers.
If that's the case, Enumerator#next
needs to be documented as not implemented.
I wonder what else in Ruby is depending on fibers?
It's reproduced on rhodes v.5.5.0.51 & 6.0.0
Using Rhodes 5.0.2 (from RMS 5.0.2).
Enumerator#next
terminates app with no logging.(Yes, I know I need an exception handler to detect the end when looping through. But no loop above.
current_test
should be set to 1.)Works in Ruby 1.9.2-p290 (same version as Rhodes) on OSX desktop irb.
This is on iOS simulator. Need to test on device to see if it bombs there as well, and see if anything in system log.