diff options
Diffstat (limited to 'complex.c')
-rw-r--r-- | complex.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -232,7 +232,10 @@ f_negative_p(VALUE x) inline static int f_zero_p(VALUE x) { - if (RB_INTEGER_TYPE_P(x)) { + if (RB_FLOAT_TYPE_P(x)) { + return FLOAT_ZERO_P(x); + } + else if (RB_INTEGER_TYPE_P(x)) { return FIXNUM_ZERO_P(x); } else if (RB_TYPE_P(x, T_RATIONAL)) { |