mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
use mrb_str_cat_lit for literals
This commit is contained in:
+1
-1
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user