Commit de6f40e
authored
Fix reverse sort in xpath_parser (#251)
The code below was failing with `REXML::XPathParser#sort': undefined
method '-@' for an instance of Array`
```ruby
d = REXML::Document.new("<a><b><c/><d/><x/></b><b><e/><x/></b></a>")
matches = REXML::XPath.match(d, "a/b/x/preceding-sibling::node()")
# Before: error
# After: [<e/>, <d/>, <c/>]
```
This pull request will fix it.1 parent d944fa4 commit de6f40e
2 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
674 | | - | |
| 674 | + | |
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
419 | 425 | | |
420 | 426 | | |
421 | 427 | | |
| |||
0 commit comments