diff options
Diffstat (limited to 'math.c')
-rw-r--r-- | math.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -620,12 +620,11 @@ math_sqrt(VALUE unused_obj, VALUE x) return rb_math_sqrt(x); } -#define f_boolcast(x) ((x) ? Qtrue : Qfalse) inline static VALUE f_negative_p(VALUE x) { if (FIXNUM_P(x)) - return f_boolcast(FIX2LONG(x) < 0); + return RBOOL(FIX2LONG(x) < 0); return rb_funcall(x, '<', 1, INT2FIX(0)); } inline static VALUE @@ -633,7 +632,7 @@ f_signbit(VALUE x) { if (RB_TYPE_P(x, T_FLOAT)) { double f = RFLOAT_VALUE(x); - return f_boolcast(!isnan(f) && signbit(f)); + return RBOOL(!isnan(f) && signbit(f)); } return f_negative_p(x); } |