From b9d2b47f163e4934d180455126f1015525916fff Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 3 Aug 2021 12:57:56 +0900 Subject: Replace `mrb_fixnum_value()` with `mrb_int_value()`. Use `mrb_fixnum_value()` only when you are absolutely sure that the value is within `Fixnum` range, i.e. 31 bits signed integer at least. --- src/numeric.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/numeric.c') diff --git a/src/numeric.c b/src/numeric.c index d9e807865..ca39e318e 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -180,7 +180,7 @@ int_idiv(mrb_state *mrb, mrb_value x) if (y == 0) { int_zerodiv(mrb); } - return mrb_fixnum_value(mrb_integer(x) / y); + return mrb_int_value(mrb, mrb_integer(x) / y); } static mrb_value -- cgit v1.2.3