mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
numeric.c: self should always be an integer in __coerce_step_counter.
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user