mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge branch 'master' of github.com:mruby/mruby
This commit is contained in:
+6
-6
@@ -897,13 +897,13 @@ fix_rev(mrb_state *mrb, mrb_value num)
|
||||
static mrb_value
|
||||
bit_coerce(mrb_state *mrb, mrb_value x)
|
||||
{
|
||||
while (!mrb_fixnum_p(x)) {
|
||||
if (mrb_float_p(x)) {
|
||||
mrb_raise(mrb, E_TYPE_ERROR, "can't convert Float into Integer");
|
||||
}
|
||||
x = mrb_to_int(mrb, x);
|
||||
while (!mrb_fixnum_p(x)) {
|
||||
if (mrb_float_p(x)) {
|
||||
mrb_raise(mrb, E_TYPE_ERROR, "can't convert Float into Integer");
|
||||
}
|
||||
return x;
|
||||
x = mrb_to_int(mrb, x);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
/* 15.2.8.3.9 */
|
||||
|
||||
Reference in New Issue
Block a user