summaryrefslogtreecommitdiffhomepage
path: root/src/sprintf.c
diff options
context:
space:
mode:
authorMasaki Muranaka <[email protected]>2012-06-22 16:46:37 +0900
committerMasaki Muranaka <[email protected]>2012-06-22 17:02:08 +0900
commit21f2e5364b5c6cda244001d779aa67d86a22e6e7 (patch)
tree43f633af01bc9583a176567667c2341be206f858 /src/sprintf.c
parent8946ad2c029671c70c980df984d9d48ac47b1dde (diff)
downloadmruby-21f2e5364b5c6cda244001d779aa67d86a22e6e7.tar.gz
mruby-21f2e5364b5c6cda244001d779aa67d86a22e6e7.zip
Use mrb_str_new() instead of mrb_str_new2() as possible.
Diffstat (limited to 'src/sprintf.c')
-rw-r--r--src/sprintf.c2
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 {