Commit 024ae41
Remove unnecessary work in negotiating the encoding to use in a
The old approach did not align with MRI and ended negotiating the encoding twice. The result of the first negotiation was used only to detect errors and then subsequently ignored. Moreover, that additional negotiation was semantically different than what MRI does. Part of this clean-up involved implementing MRI's `rb_reg_prepare_enc` and using that for all match operations.
As an additional benefit, by synchronizing with MRI's implementation, we now handle a warning case that we did not previously, allowing us to untag some MRI tests.Regexp match.1 parent 4f76e4d commit 024ae41
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
117 | 121 | | |
118 | 122 | | |
119 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
120 | 133 | | |
121 | 134 | | |
122 | 135 | | |
| |||
0 commit comments