diff options
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1518,7 +1518,9 @@ flo_cmp(VALUE x, VALUE y) MJIT_FUNC_EXPORTED int rb_float_cmp(VALUE x, VALUE y) { - return NUM2INT(flo_cmp(x, y)); + VALUE c = flo_cmp(x, y); + if (NIL_P(c)) rb_cmperr(x, y); + return NUM2INT(c); } /* |