Skip to content

Commit

Permalink
Should use mrb_int for any object
Browse files Browse the repository at this point in the history
o=Object.new
def o.to_int
  1
end
p "%*d" % [o, 1]
  • Loading branch information
ksss committed Mar 18, 2017
1 parent fa502b4 commit 2005bf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mrbgems/mruby-sprintf/src/sprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ check_name_arg(mrb_state *mrb, int posarg, const char *name, int len)
tmp_v = GETNEXTARG(); \
p = t; \
} \
num = mrb_fixnum(tmp_v); \
num = mrb_int(mrb, tmp_v); \
} while (0)

static mrb_value
Expand Down

0 comments on commit 2005bf9

Please sign in to comment.