summaryrefslogtreecommitdiffhomepage
path: root/src/codegen.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-03-09 03:01:54 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-03-09 03:01:54 +0900
commitbc663549eae0d16a2adb0cb0b1b68d34befe501c (patch)
treebc2bbc4813fbfc722de76f60125e31c3aa0ab86c /src/codegen.c
parent24839d74b278b5898d2803a926461f5ac2e73711 (diff)
parentbfc522bcd56b0be97c16a80dc00174eca5dd4fcc (diff)
downloadmruby-bc663549eae0d16a2adb0cb0b1b68d34befe501c.tar.gz
mruby-bc663549eae0d16a2adb0cb0b1b68d34befe501c.zip
Merge pull request #1833 from cremno/use-mrb_str_cat_lit
use mrb_str_cat_lit for literals
Diffstat (limited to 'src/codegen.c')
-rw-r--r--src/codegen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.c b/src/codegen.c
index 700cfdbf8..71849f172 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -1915,7 +1915,7 @@ codegen(codegen_scope *s, node *tree, int val)
mrb_value fix = mrb_fixnum_value((intptr_t)tree);
mrb_value str = mrb_str_buf_new(mrb, 4);
- mrb_str_buf_cat(mrb, str, "$", 1);
+ mrb_str_cat_lit(mrb, str, "$");
mrb_str_buf_append(mrb, str, mrb_fixnum_to_str(mrb, fix, 10));
sym = new_sym(s, mrb_intern_str(mrb, str));
genop(s, MKOP_ABx(OP_GETGLOBAL, cursp(), sym));