Commit 0f10e48
committed
YJIT: Fix super() from a block method not rooted in a "def" method
Previously, we unconditionally passed to the callee
`GET_LEP(calling_frame)[VM_ENV_DATA_INDEX_SPECVAL]`, which in case the
block containing super() is in e.g. a `class`, did not resolve to a
block handler at all.
Properly locate the block handler using logic used in
Kernel#block_given? and defined?(yield). Rename BlockHandler::LEPSpecVal
to FindFromCurrentFrame to reflect this change, as the block handler is
not always in LEP.
[Bug #22116]1 parent 3a1832b commit 0f10e48
2 files changed
Lines changed: 66 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1041 | 1041 | | |
1042 | 1042 | | |
1043 | 1043 | | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
1044 | 1093 | | |
1045 | 1094 | | |
1046 | 1095 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6805 | 6805 | | |
6806 | 6806 | | |
6807 | 6807 | | |
6808 | | - | |
6809 | | - | |
| 6808 | + | |
| 6809 | + | |
6810 | 6810 | | |
6811 | 6811 | | |
6812 | 6812 | | |
| |||
6870 | 6870 | | |
6871 | 6871 | | |
6872 | 6872 | | |
6873 | | - | |
6874 | | - | |
6875 | | - | |
| 6873 | + | |
| 6874 | + | |
| 6875 | + | |
| 6876 | + | |
| 6877 | + | |
| 6878 | + | |
| 6879 | + | |
| 6880 | + | |
| 6881 | + | |
| 6882 | + | |
| 6883 | + | |
| 6884 | + | |
| 6885 | + | |
| 6886 | + | |
6876 | 6887 | | |
6877 | 6888 | | |
6878 | 6889 | | |
| |||
9880 | 9891 | | |
9881 | 9892 | | |
9882 | 9893 | | |
9883 | | - | |
| 9894 | + | |
9884 | 9895 | | |
9885 | 9896 | | |
9886 | 9897 | | |
| |||
0 commit comments