From: "Dmitry V. Sabanin" Date: 2003-11-22T22:34:27+09:00 Subject: Invoking method with a block in C extension Hi. I'm converting some of my ruby code to C extension for better perfomance. I ran into problems with executing methods that take blocks. I.e. in ruby i have string.gsub!(/regexp/) { |subst| ... } and i can't find the way to translate it to C. I tried to search through ruby-talk archives, but I couldn't find anything usefull. As far as I was looking at problem, I found rb_iterate, rb_yield, but I couldn't clearly understand what's their purpose, and how to get them all together to achieve what I want. Could somebody please explain me how can I implement this ruby code in C? I'd really appreciate any help. Thanks in advance! -- sdmitry -=- Dmitry V. Sabanin MuraveyLabs.