use mrb_str_cat_lit for literals

This commit is contained in:
cremno
2014-03-08 18:38:31 +01:00
parent ee57789c72
commit bfc522bcd5
5 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -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));