diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-07-10 17:04:57 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-07-10 17:04:57 +0900 |
| commit | ce2d7c2e019f93d993d6de56d9c234b43156e9cb (patch) | |
| tree | fbcc5b549c878e46eb9cc54b91d700c1d8ad4f35 /src/numeric.c | |
| parent | be6d55985372027684dee628f483d17ff7f284b7 (diff) | |
| download | mruby-ce2d7c2e019f93d993d6de56d9c234b43156e9cb.tar.gz mruby-ce2d7c2e019f93d993d6de56d9c234b43156e9cb.zip | |
numeric.c: `self` should always be an integer in `__coerce_step_counter`.
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 a01293286..b22026ebb 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -211,7 +211,7 @@ coerce_step_counter(mrb_state *mrb, mrb_value self) #ifndef MRB_NO_FLOAT mrb->c->ci->mid = 0; - if (mrb_float_p(self) || mrb_float_p(num) || mrb_float_p(step)) { + if (mrb_float_p(num) || mrb_float_p(step)) { return mrb_to_float(mrb, self); } #endif |
