canon 0.3.84 → 0.3.85

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
  SHA256:
3
- metadata.gz: 8eb8f8e66d462a55fad0d7a649c3c928ecd8e4e0d3a774c38bccfb4be7972fd4
4
- data.tar.gz: 8114e80672e76a7c239c76ad485d7d3bb2c090871ff4e44f59d7d46cf31db569
3
+ metadata.gz: 5dbb59b967dbaedab05c9dd8aa4186851ed71d055c44d89ecc23f2b8c8b92e96
4
+ data.tar.gz: c665d661c0e4984f112a82239406ddc349b6120be032849adf5de7db75331217
5
5
  SHA512:
6
- metadata.gz: 4939b31f56f07b0c61d7d91a40550eb039e1e2f7d3707c6ae8213ed928386c3533ae64badbd66f8ee09d89f6054a0a2d56149c83fbe4b459deb51db7e5122346
7
- data.tar.gz: 706e55d06c6998cbe1d9828f286480c9b270f59d0926c0cb4b410b2ac0dde4a135fe28e61575aa6e06c3a8a3aa48bfb74b08a030dc9e9d88a64f775dc3f76ede
6
+ metadata.gz: f75058359a37d053f57d6c6d86b27330a0553f925ba49755fa24d31fd248ff0c72b3393d539f75e9cd16fefd02813a590b2e9192031ba1a201cadf4dc7175bc1
7
+ data.tar.gz: e64b15e520378443018037c78931a7ce9172728ca7c25b8d0caad7acdc1bd6379682e63f8bd28bf88659eef99ec62d03dd86812db282ad936b92d5128d4031b0
data/lib/canon/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Canon
4
- VERSION = "0.3.84"
4
+ VERSION = "0.3.85"
5
5
  end
@@ -278,13 +278,6 @@ preserve_whitespace: false)
278
278
  # consumes them synchronously before the next record reuses
279
279
  # the buffer.
280
280
  moxml_element.materialize_fields do |kind, qname, prefix, namespace_uri, namespaces, attributes, text, depth|
281
- # The record contract is root-subtree-only since moxml 0.5.11
282
- # (moxml#140). Older 0.5.x releases — still allowed by canon's
283
- # gemspec floor — leaked epilog document-level records at depth
284
- # 0, which the document-children enumeration also covers; one
285
- # integer compare per record keeps those working.
286
- next if depth.zero? && kind != :element
287
-
288
281
  # Relative-namespace validation rides the stream (the
289
282
  # namespaces buffer is the element's own declarations) — no
290
283
  # separate wrapper-tree walk per parse.
@@ -60,7 +60,7 @@ module Canon
60
60
  # contract keys off the RECORD, not the raise: non-HTML
61
61
  # malformed input stays loud; HTML-shaped input falls back to
62
62
  # the HTML parser. Engine-independent by construction.
63
- recorded = doc.respond_to?(:parse_errors) ? doc.parse_errors : []
63
+ recorded = doc.parse_errors
64
64
  if recorded.any?
65
65
  raise Moxml::ParseError, recorded.join("; ") unless html_shaped?(xml_string)
66
66
 
@@ -114,31 +114,11 @@ module Canon
114
114
  end
115
115
  end
116
116
 
117
- # Same underlying engine node? Wrapper identity first (correct
118
- # everywhere wrappers are unified). Fallback: moxml 0.5.36-0.5.39
119
- # wrap Document#root and Document#children entries in DIFFERENT
120
- # wrapper classes for one node (NativeNode vs the FFI Element —
121
- # moxml#216), so identity fails exactly where consumers exclude
122
- # the document element from children; the shared C pointer
123
- # address is the stable identity. Inert once wrappers unify.
117
+ # Same underlying engine node? Wrappers are unified on every
118
+ # moxml the gemspec floor allows (moxml#219 landed in 0.5.40), so
119
+ # object identity is the whole answer.
124
120
  def same_engine_node?(left, right)
125
- return true if left.equal?(right)
126
- return false unless defined?(::Moxml::Node) &&
127
- left.is_a?(::Moxml::Node) && right.is_a?(::Moxml::Node)
128
-
129
- address_left = moxml_node_address(left)
130
- address_right = moxml_node_address(right)
131
- !address_left.nil? && address_left == address_right
132
- end
133
-
134
- def moxml_node_address(wrapper)
135
- native = wrapper.native
136
- case native
137
- when ::Leptris::XML::NativeNode then native.address
138
- when ::Leptris::XML::Node then native.c_ptr.address
139
- end
140
- rescue StandardError
141
- nil
121
+ left.equal?(right)
142
122
  end
143
123
 
144
124
  # --- Type checks (any recognized engine node) ---
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.84
4
+ version: 0.3.85
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.9.340
47
+ version: 1.9.341
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.9.340
54
+ version: 1.9.341
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: moxml
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.5.125
61
+ version: 0.5.126
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.5.125
68
+ version: 0.5.126
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: paint
71
71
  requirement: !ruby/object:Gem::Requirement