From: Jeremy Henty Date: 2005-06-01T16:55:23+09:00 Subject: Re: rb_f_lambda vs. rb_block_proc : what are the issues? In article <200505310607.j4V67vTW003371@moulon.inra.fr>, ts wrote: >>>>>> "J" == Jeremy Henty writes: > >J> * If I have to #ifdef a macro to support both 1.6.x and 1.8.x , what's >J> a clean way to do it? > > svg% /usr/bin/ruby -vrmkmf -e 'have_func("rb_block_proc")' OK, so if I add 'have_func("rb_block_proc")' to extconf.rb and: #ifndef HAVE_RB_BLOCK_PROC #define rb_block_proc rb_f_lambda #endif to the header file, I can globally replace rb_f_lambda by rb_block_proc everywhere else and the result will build under 1.6.x ? I don't have time to test this before I go to work but I will this evening (unless someone points out some pitfall I've missed). Sorry for the newbie questions but since I'm managing a public project now I really want to do this the best way. Thanks for your help, Jeremy Henty