From: elathan@... Date: 2004-01-28T19:00:09+09:00 Subject: Re: float types Quoting ts : > >>>>> "e" == elathan writes: > > e> if (TYPE(arg1) == T_FLOAT) > > Write it > > arg1 = rb_Float(arg1); 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. So, if I have: foo (char *, double, double); foo (double, int, int); I can then call in ruby: foo 42, 20, 20 foo 42.0, 20, 20 foo "bar", 10, 1.2 If this isn't supported by the Ruby API I will write my own C macro that will return true if TYPE == T_FLOAT || TYPE == T_FIXNUM. Regards, Elias