nobu.nokada / softhome.net wrote: > > Hi, > > At Sun, 19 May 2002 09:47:50 +0900, > Lyle Johnson wrote: > > if (rb_obj_is_instance_of(MyValue, rb_cRange) == Qtrue) ... > > In generally, I don't guess it's a good idea to compare a > boolean value with TRUE, and prefer just: > > if (rb_obj_is_instance_of(MyValue, rb_cRange)) ... Maybe I'm paranoid, but I've been using if (RTEST(rb_obj_is_instance_of(MyValue, rb_cRange))) ... just in case the return value is Qnil, because Qnil != 0. Maybe that's never going to happen with this particular function, but it seems like a good habit.