[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: breaking out of self implemented each

Geert Fannes

3/7/2006 9:48:00 AM

SORRY,PLEASE IGNORE THIS MAIL. I MADE A MISTAKE, IT DOES WORK AS SHOULD
BE.
Greetigns,
Geert.

-----Original Message-----
From: Geert Fannes [mailto:Geert.Fannes@ikanconsulting.com]
Sent: Tuesday, March 07, 2006 10:44 AM
To: ruby-talk ML
Subject: breaking out of self implemented each

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.