summaryrefslogtreecommitdiffhomepage
path: root/src/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/numeric.c')
-rw-r--r--src/numeric.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/numeric.c b/src/numeric.c
index e4d9c9ff9..562562340 100644
--- a/src/numeric.c
+++ b/src/numeric.c
@@ -878,7 +878,7 @@ static mrb_value
bit_coerce(mrb_state *mrb, mrb_value x)
{
while (!mrb_fixnum_p(x)) {
- if (mrb_type(x) == MRB_TT_FLOAT) {
+ if (mrb_float_p(x)) {
mrb_raise(mrb, E_TYPE_ERROR, "can't convert Float into Integer");
}
x = mrb_to_int(mrb, x);