From: Andre Nathan Date: 2007-11-23T05:33:15+09:00 Subject: Calling and passing blocks in a C extension Hello How do I do the equivalent of the code below in a C extension? def foo(&block) x = 0 my_iterator do |b| b.process(&block) x += 1 end return x end I tried lots of different combinations of rb_iterate() and rb_proc_new() but it turned into one big mess :s Thanks, Andre