summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bignum.c b/bignum.c
index 873d359540..b4e9148f42 100644
--- a/bignum.c
+++ b/bignum.c
@@ -861,9 +861,12 @@ rb_big_eq(x, y)
case T_BIGNUM:
break;
case T_FLOAT:
- return (rb_big2dbl(x) == RFLOAT(y)->value)?Qtrue:Qfalse;
+ if (rb_big2dbl(x) == RFLOAT(y)->value)
+ return Qtrue;
+ else
+ return Qfalse;
default:
- return Qfalse;
+ return rb_equal(y, x);
}
if (RBIGNUM(x)->sign != RBIGNUM(y)->sign) return Qfalse;
if (RBIGNUM(x)->len != RBIGNUM(y)->len) return Qfalse;