Repository navigation
Commit 00c2a4e
Validate the params of an optional Hash scope without the iterator (#3075)
A validator reads its scope's params directly, and skips the attributes
iterator, when its scope is always validated: the root scope and the
required Hash scopes under it. A Hash scope that is optional, or that
sits under an optional one, went through the iterator instead, although
it has nothing to add there either: #validate only goes on once the
scope's params are there and not blank, so the iterator hands that one
Hash back, has no empty value to pass over and no dependency to meet.
The direct path now covers every scope with no Array scope and no
`given` on its chain. It no longer tries a required Hash scope inside an
Array scope, whose params resolve to an Array and were resolved a second
time by the iterator.
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>1 parent 0964ce5 commit 00c2a4e
3 files changed
Lines changed: 16 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
0 commit comments