Permalink
Browse files

mruby-eval: instance_eval should keep target_class; close #3141

  • Loading branch information...
matz committed Apr 11, 2016
1 parent ae5b5ce commit 8c67e915b412f3a46f598fb5b4b2d6cfb5dec751
Showing with 1 addition and 1 deletion.
  1. +1 −1 mrbgems/mruby-eval/src/eval.c
@@ -247,7 +247,7 @@ f_instance_eval(mrb_state *mrb, mrb_value self)
cv = mrb_singleton_class(mrb, self);
c->ci->target_class = mrb_class_ptr(cv);
proc = create_proc_from_string(mrb, s, len, mrb_nil_value(), file, line);
return mrb_top_run(mrb, proc, mrb->c->stack[0], 0);
return mrb_vm_run(mrb, proc, mrb->c->stack[0], 0);
}
else {
mrb_get_args(mrb, "&", &b);

0 comments on commit 8c67e91

Please sign in to comment.