Refactor fix_to_f in numeric.c

This commit is contained in:
Jun Hiroe
2014-04-13 00:25:01 +09:00
parent 212b3409ae
commit cdb49ab608
+1 -5
View File
@@ -1073,11 +1073,7 @@ fix_rshift(mrb_state *mrb, mrb_value x)
static mrb_value
fix_to_f(mrb_state *mrb, mrb_value num)
{
mrb_float val;
val = (mrb_float)mrb_fixnum(num);
return mrb_float_value(mrb, val);
return mrb_float_value(mrb, (mrb_float)mrb_fixnum(num));
}
/*