From: ts Date: 2001-10-17T21:59:11+09:00 Subject: [ruby-talk:22671] Re: blocks in C??? (and hi guys) >>>>> "M" == Mikkel Bruun writes: M> im writing a c extension to ruby, and I have to call a method defined in a M> ruby class. however, the method needs to be passed a block... M> How do i pass a block i c??? rb_iterate(), you have in README.EXT VALUE rb_iterate(VALUE (*func1)(), void *arg1, VALUE (*func2)(), void *arg2) Calls the function func1, supplying func2 as the block. func1 will be called with the argument arg1. func2 receives the value from yield as the first argument, arg2 as the second argument. Guy Decoux