backtrack-xpath 0.1.4 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1a0734378f5a72d8583d3e5734150dd9425d7cd
4
- data.tar.gz: 8767945fe64649bf1b4d95d5da567934593a05e3
3
+ metadata.gz: 171b32b032bbce5608ae3bc62979fd748cfa9baf
4
+ data.tar.gz: 07b15e3269758bba8603dfb22133c980b65b5698
5
5
  SHA512:
6
- metadata.gz: 215f3a455e960daf4053197059efb8aab7a1a4b0c087cc63b4c249810f14c13af1e2aa49832ceebfbcc155084bd8bfa29a70aae3024dd3c56629e52f720517aa
7
- data.tar.gz: ae54677975f3b56efd1dd862c441c56040e0e0da380ce9f0c7563f87babf1e8d8ecd1cf19015dcadc3495b51fd0596379f5594df1bfe9192601d3de80dc0e889
6
+ metadata.gz: 35491e81367e8a56180c16f89f5301fe9f942c94f557f86f19e86923bc8e344e5b2c3b9ffbb5d69309cd0a2ae40e43a49d5c7f8bfc1c0e4894cf6371462b1a91
7
+ data.tar.gz: 211b70808bf834c3ba3326102f69a75a7c71883e75f798c86155d0da92f12cf59ff8c7bc5fa49e52de100008e814d4b904f3e3e3b67ae418a8803198422dac68
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -27,11 +27,13 @@ class BacktrackXPath
27
27
  result
28
28
  end
29
29
 
30
- def doc_scan(node)
30
+ def doc_scan(node)
31
+
32
+ return unless node.parent
31
33
 
32
34
  name = node.name
33
35
  attribute = node.attributes ? attribute_scan(node) : ''
34
- result = node.parent.parent ? doc_scan(node.parent) : ''
36
+ result = doc_scan(node.parent)
35
37
 
36
38
  [result, name + attribute]
37
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backtrack-xpath
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file