Commit ae20cb5
committed
Fix Schema::Element required? and array? methods
In
133096b#diff-ff32e4dff2433e31f170b6f43842c940bec1c3581a07a5e3bc44887ce973fcc0L67-L76
the `min_occurs` and `max_occurs` getters were removed, saying they were
"invalid". The additional message in
[HISTORY](https://github.com/xml4r/libxml-ruby/blob/master/HISTORY#L63C111-L63C111)
states:
> Remove SchemaElement#minOccurs and SchemaElement#maxOccurs since they actually did not work (Charlie Savage)
[Additional history here](https://github.com/search?q=repo%3Axml4r%2Flibxml-ruby+min_occurs&type=commits)
I'm not aware of any more context surrounding the change, but those
methods were still referenced by the Schema::Element's `array?` and
`required?` methods. This PR adds tests for those two methods and adds
simple ivar reader methods to replace those removed C methods.1 parent b0fd435 commit ae20cb5
2 files changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
6 | 14 | | |
7 | 15 | | |
8 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
201 | 203 | | |
202 | 204 | | |
203 | 205 | | |
| 206 | + | |
| 207 | + | |
204 | 208 | | |
205 | 209 | | |
206 | 210 | | |
207 | 211 | | |
| 212 | + | |
| 213 | + | |
208 | 214 | | |
209 | 215 | | |
210 | 216 | | |
| |||
0 commit comments