mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
cf20687ee7
Their bodies were nearly identical: same argument parsing, same proc creation, same target-class plumbing. The only differences are which method to delegate to in the block-given case (mrb_obj_instance_eval vs. mrb_mod_module_eval) and which class to use as the target (singleton vs. self-as-class). Extract the shared logic into object_eval(self, class_eval). The two top-level dispatchers become one-line wrappers. Closes #6579, picked from PR by dearblue. Co-authored-by: Claude <noreply@anthropic.com>