diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-06-22 17:43:16 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-06-22 17:43:16 -0700 |
| commit | 771ab3bc4e8f9818f934b4203d6adf24ec1df501 (patch) | |
| tree | 45330964ce691320734459cd8d3d54aba27b1b89 /src/sprintf.c | |
| parent | 58caf67215f5bdc481d7219822351261816356bd (diff) | |
| parent | 21f2e5364b5c6cda244001d779aa67d86a22e6e7 (diff) | |
| download | mruby-771ab3bc4e8f9818f934b4203d6adf24ec1df501.tar.gz mruby-771ab3bc4e8f9818f934b4203d6adf24ec1df501.zip | |
Merge pull request #309 from monaka/pr-reduce-mrb_str_new2
Reduce mrb_str_new2
Diffstat (limited to 'src/sprintf.c')
| -rw-r--r-- | src/sprintf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sprintf.c b/src/sprintf.c index c23969792..e01bf572e 100644 --- a/src/sprintf.c +++ b/src/sprintf.c @@ -89,7 +89,7 @@ mrb_fix2binstr(mrb_state *mrb, mrb_value x, int base) val &= 0x3ff; if (val == 0) { - return mrb_str_new2(mrb, "0"); + return mrb_str_new(mrb, "0", 1); } *--b = '\0'; do { |
