Skip to content
Browse files
Move #instance_exec to Kernel module
CRuby defines #instance_exec in BasicObject, but we don't.
It's a small incompatibility that isn't worth accomplish at
the price of implementation complexity.
  • Loading branch information
matz committed Feb 15, 2017
1 parent 517e931 commit b165708c8deba00685f9a27926c554aaa7f3b0fb
Showing 1 changed file with 1 addition and 1 deletion.
@@ -96,7 +96,7 @@ mrb_mruby_object_ext_gem_init(mrb_state* mrb)
mrb_define_method(mrb, n, "to_f", nil_to_f, MRB_ARGS_NONE());
mrb_define_method(mrb, n, "to_i", nil_to_i, MRB_ARGS_NONE());

mrb_define_method(mrb, mrb->object_class, "instance_exec", mrb_obj_instance_exec, MRB_ARGS_ANY() | MRB_ARGS_BLOCK());
mrb_define_method(mrb, mrb->kernel_module, "instance_exec", mrb_obj_instance_exec, MRB_ARGS_ANY() | MRB_ARGS_BLOCK());


0 comments on commit b165708

Please sign in to comment.