Files
mruby-mruby/include/mruby
dearblue 8ecfacefca Prohibit Class#allocate in a different way
The method introduced by #5979 causes a fault by swapping classes.

```console
% bin/mruby -e 'Method = Proc; p Object.method(:inspect)'
zsh: segmentation fault (core dumped)  bin/mruby -e 'Method = Proc; p Object.method(:inspect)'
```

After applying this patch, a `TypeError` exception will be raised.

```console
% bin/mruby -e 'Method = Proc; p Object.method(:inspect)'
trace (most recent call last):
        [1] -e:1
-e:1:in method: allocation failure of Proc (TypeError)
```

However, if the `mrb_vtype` is the same object, the same care must still be taken as before.

```console
% bin/mruby -e 'Method = Binding; p method(:puts).eval("12345")'
trace (most recent call last):
        [1] -e:1
-e:1:in eval: wrong argument type nil (expected Proc) (TypeError)
```
2023-12-22 21:59:34 +09:00
..
2022-01-02 11:52:19 +09:00
2020-11-17 12:41:10 +09:00
2023-05-03 22:12:59 +10:00
2023-05-03 22:12:59 +10:00
2023-12-07 21:33:14 +09:00
2023-09-09 14:31:13 +09:00
2019-12-13 04:41:43 +09:00
2023-05-22 12:05:35 +09:00
2022-12-03 14:26:05 +09:00
2019-08-18 20:12:44 +09:00