>>>>> "M" == Minero Aoki <aamine / dp.u-netsurf.ne.jp> writes:

M> Sorry for my incomplete explanation. I intended to rb_gc_mark() for
M> NODE_IFUNC is unnecessary, because an argument is on the stack frame,

 Well in reality rb_gc_mark() is needed for NODE_IFUNC.

 NODE_IFUNC was introduced by this patch [ruby-talk:8288], because in some
 case ruby need to mark the block, or the proc

 When you call rb_iterate(), ruby now create a NODE_IFUNC (previously it
 was a node NODE_CFUNC). I don't know if ruby can know if the object
 is on the stack frame (and not call rb_gc_mark() for this object)

 This is why now you must give a valid object (it was not necessary before
 this patch).

 This explain also why you can see the problem only if you have a recent
 version of ruby (1.7.xx)

M> (to make up for my discription, I attach my modification.)

 Well, I need to make some similar modifications in my extensions :-)


Guy Decoux