From: Lyle Johnson Date: 2004-01-28T22:44:54+09:00 Subject: Re: float types elathan@phys.uoa.gr wrote: > Actually I want to check the arguments' types before calling the > appopriate (overloaded) C++ function. So, I want a check that > '42' and '42.0' passes and a check that '42' only passes. For the more general case (where both 42 and 42.0 pass), perhaps you could check to see if the argument is a Numeric, i.e. if (Qtrue == rb_obj_is_kind_of(arg1, rb_cNumeric)) { /* could be an Integer, Float, or other numeric type */ } else if (TYPE(arg1) == T_FIXNUM) { /* it's definitely a Fixnum) */ } If you need to specifically check for (Fixnum || Float) and no other Numeric types are supported then yes, you may need to roll a little custom macro for that case. Hope this helps, Lyle