numeric.c: self should always be an integer in __coerce_step_counter.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2021-07-10 17:04:57 +09:00
parent be6d559853
commit ce2d7c2e01
+1 -1
View File
@@ -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