summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-object-ext/src/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'mrbgems/mruby-object-ext/src/object.c')
-rw-r--r--mrbgems/mruby-object-ext/src/object.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mrbgems/mruby-object-ext/src/object.c b/mrbgems/mruby-object-ext/src/object.c
index 8a2325ef9..c6caf935f 100644
--- a/mrbgems/mruby-object-ext/src/object.c
+++ b/mrbgems/mruby-object-ext/src/object.c
@@ -1,6 +1,7 @@
#include <mruby.h>
#include <mruby/array.h>
#include <mruby/class.h>
+#include <mruby/proc.h>
/*
* call-seq:
@@ -86,7 +87,8 @@ mrb_obj_instance_exec(mrb_state *mrb, mrb_value self)
}
args = mrb_ary_new_from_values(mrb, argc, argv);
argv = RARRAY_PTR(args);
- return mrb_yield_with_class(mrb, blk, argc, argv, self, c);
+ mrb->c->ci->target_class = c;
+ return mrb_yield_cont(mrb, blk, self, argc, argv);
}
void