Forum: Ruby breaking out of self implemented each

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Geert F. (Guest)
on 2006-03-07 11:45
(Received via mailing list)
Hello,



I implemented a #each method in a C extension and uses rb_yield for each
iteration of the #each method. Apparently, the break functionality to
interupt the normal #each iterations does not work when using my own
#each function. Why does Ruby not break out of the loop, I return
control to ruby after each rb_yield call? How can I catch in my C
function that a break has been issued, or how can I fix this so that it
has the required behaviour?



Greetings,

Geert.
This topic is locked and can not be replied to.