From: Ryan Davis Date: 2007-04-08T04:57:26+09:00 Subject: Re: rb_yield(), break, and C extensions On Apr 7, 2007, at 10:08 , Kent Sibilev wrote: > You should wrap your rb_yield call with rb_ensure. From README.EXT: > > VALUE rb_ensure(VALUE (*func1)(), void *arg1, void (*func2)(), void > *arg2) > > Calls the function func1 with arg1 as the argument, then calls func2 > with arg2 if execution terminated. The return value from > rb_ensure() is that of func1. Right, for an example of this, take a look at the inline'd code in image_science. I just had to wrap all this stuff up in the same way.