leptris 1.9.20 → 1.9.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/searchable.rb +9 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 01fef4edf0eca47c087e7c3e111952207c69c10ed75c367858f284f78b5c6753
|
|
4
|
+
data.tar.gz: 4b094de8b8b535e081fee40f7fd1117330ed0b28ad909043293c34071ae47335
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 92c89619228205696fe95555b1e2cb55032237ff82066651140824219994ae0e9a60829a6de0262e7a21de39fcb1655177575de18c9191bb52e50f7a1b772a21
|
|
7
|
+
data.tar.gz: 12862b063ed8f1c903c53f17de0e1d30f84b059c042a9f3ca1c786901af4189362f311f67fe51a1df0905a4b7e5e30d7638061293a9c5d3cfc238bd1856ba888
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ All notable changes to Leptris will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.9.21] - 2026-08-27
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **`#at` / `#%` take the single-node seam**: the generic entry now
|
|
13
|
+
dispatches on syntax (like `#search`) and calls `at_xpath` /
|
|
14
|
+
`at_css` directly instead of routing through
|
|
15
|
+
`search().first` and its NodeSet container — the round-XIV fast
|
|
16
|
+
path's last un-routed caller. Measured: `at("item > name")` 0.026 s
|
|
17
|
+
-> 0.020 s per 2000 iterations (**-23%**, now at parity with
|
|
18
|
+
`at_css`); scalar semantics for XPath-shaped expressions keep the
|
|
19
|
+
full-wrapper behavior.
|
|
20
|
+
|
|
8
21
|
## [1.9.20] - 2026-08-27
|
|
9
22
|
|
|
10
23
|
### Changed
|
data/lib/leptris/version.rb
CHANGED
|
@@ -50,9 +50,16 @@ module Leptris::XML::Searchable
|
|
|
50
50
|
end
|
|
51
51
|
alias_method :/, :search
|
|
52
52
|
|
|
53
|
+
# Single-node seam (round XIV): dispatch on syntax like #search,
|
|
54
|
+
# then call the at_* fast paths directly — no NodeSet container,
|
|
55
|
+
# no result handle, one fewer dispatch than search().first.
|
|
53
56
|
def at(*args)
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
paths = args.first.is_a?(Array) ? args.first : [args.first]
|
|
58
|
+
if paths.map(&:to_s).all? { |p| looks_like_xpath?(p) }
|
|
59
|
+
at_xpath(*paths)
|
|
60
|
+
else
|
|
61
|
+
at_css(*args)
|
|
62
|
+
end
|
|
56
63
|
end
|
|
57
64
|
alias_method :%, :at
|
|
58
65
|
|