diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-08-03 12:57:56 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-08-03 13:00:11 +0900 |
| commit | b9d2b47f163e4934d180455126f1015525916fff (patch) | |
| tree | 0b55c896d82a8f3b4f28960ede022e6a795e79d7 /src/numeric.c | |
| parent | 23e7cb41e5b4b023edfa2a018545b8f09069533c (diff) | |
| download | mruby-b9d2b47f163e4934d180455126f1015525916fff.tar.gz mruby-b9d2b47f163e4934d180455126f1015525916fff.zip | |
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.
Diffstat (limited to 'src/numeric.c')
| -rw-r--r-- | src/numeric.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
