Should be OP_LOADL

This commit is contained in:
mattn
2013-02-15 09:22:59 +09:00
parent b1a5146ea8
commit 6aee0485fc
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -1915,14 +1915,14 @@ codegen(codegen_scope *s, node *tree, int val)
char *p = (char*)tree->car;
size_t len = (intptr_t)tree->cdr;
int ai = mrb_gc_arena_save(s->mrb);
struct RClass* c = mrb_class_get(s->mrb, "Regexp");
struct RClass* c = mrb_class_get(s->mrb, "Regexp");
mrb_value args[1];
args[0] = mrb_str_new(s->mrb, p, len);
int off = new_lit(s,
mrb_class_new_instance(s->mrb, 1, args, c));
mrb_gc_arena_restore(s->mrb, ai);
genop(s, MKOP_ABx(OP_STRING, cursp(), off));
genop(s, MKOP_ABx(OP_LOADL, cursp(), off));
push();
}
break;