Revert "vm.c (mrb_funcall_with_block): avoid use of MRB_METHOD_CFUNC_P()."

This reverts commit c28ac75a87.
This change caused SEGV in the case like the following:

```
class C
  class << self
    attr_accessor :a
    alias :const_missing :a=
  end
end
p C::CONST
```
This commit is contained in:
Yukihiro "Matz" Matsumoto
2022-08-20 12:58:17 +09:00
parent 563010697e
commit c7d2eaa3e8
+1 -1
View File
@@ -664,7 +664,7 @@ mrb_funcall_with_block(mrb_state *mrb, mrb_value self, mrb_sym mid, mrb_int argc
ci->mid = mid;
ci->proc = MRB_METHOD_PROC_P(m) ? MRB_METHOD_PROC(m) : NULL;
if (ci->proc == NULL) {
if (MRB_METHOD_CFUNC_P(m)) {
ci->stack[0] = self;
val = MRB_METHOD_CFUNC(m)(mrb, self);
cipop(mrb);