Skip to content

Commit

Permalink
int64_value(): use FIXABLE()
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Nov 22, 2016
1 parent fb77765 commit 8cba708
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/numeric.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ value_int64(mrb_state *mrb, mrb_value x)
static mrb_value
int64_value(mrb_state *mrb, int64_t v)
{
if (MRB_INT_MIN <= v && v <= MRB_INT_MAX) {
if (FIXABLE(v)) {
return mrb_fixnum_value((mrb_int)v);
}
return mrb_float_value(mrb, (mrb_float)v);
Expand Down

0 comments on commit 8cba708

Please sign in to comment.