From: matz@... (Yukihiro Matsumoto) Date: 2004-01-28T23:10:11+09:00 Subject: Re: float types Hi, In message "float types" on 04/01/28, elathan@phys.uoa.gr writes: |Shouldn't: | |if (TYPE(arg1) == T_FLOAT) | |be true when someone passes '42' (for example) and not '42.0'. No, Ruby C API do not processing mathematics. It handles structure of data. It doesn't care whether integer 42 can be seen as float in math. |I have foo(double i); and I check the passed arguments. I expect the |right ruby implementation to accept a foo(42) call. As Guy stated, call rb_Float() before invoking foo(double); matz.