moxml 0.5.86 → 0.5.88

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: 24155b1be6da49c7e24b3be5bef79caeac8e76f19c006329382330dee7d4e259
4
- data.tar.gz: 0f8b8736e98239902ad1dfe0deba7f7c4b22f61400ae6628ebcc8e5484ef319b
3
+ metadata.gz: 3da81cdaaa2647c6108fb24c6616a7da3c6c089b8c8a7f92487153d63995b2f3
4
+ data.tar.gz: 768131fdcf003decd4969cebf509e13882c614dae60cb2c2745a6764fb288e0c
5
5
  SHA512:
6
- metadata.gz: 4a1a93ce53b2dee189b74c608f930483c4a0ecffaeed03a570486bede424e6cf9244d7262e038ba8cb0a5a2d3b2d2c99711a47fac53f5abdc87640957a9ae379
7
- data.tar.gz: 5b997e1cf171d4f6c08bfedb2fb9cb0caa02e022d491e26a63e1e613fe8340972e8629cfe28e158d23ee1c24956d4e54d541af8b76c44f1be6ca25d9e7aa0d76
6
+ metadata.gz: 0f6b74c76e0174900feb641f2253a803f5ce0d29f0a7f8f4ee979ad055929ba297f400a9c9fcb37d56bb1ff137f18253606903794aa13a6107e0a412a0a7e989
7
+ data.tar.gz: c635ec9a1958c823d4f2fad192326ae85f489756f2d8110af771ee8ad5ca49e6708e529cce0814292a44b1054dbab879d03bc839c87fc65c043bf131949d733d
@@ -235,28 +235,22 @@ module Moxml
235
235
  ::Moxml::ElementBehavior.instance_method(:[])
236
236
 
237
237
  # Bindings >= 1.9.194.1 (the floor) carry unshadowed
238
- # aliases; the UnboundMethod#bind_call face for older
239
- # shapes is deleted.
240
- # Doc-level entity-marker memo (one WeakMap,
241
- # generation-stamped Integer values).
242
- ENTITY_DOC_MEMO = ::ObjectSpace::WeakMap.new
243
238
 
244
239
  module Reads
245
- # Marker presence is a DOCUMENT fact, but the wrapper
246
- # memo re-derives it per node (the per-read machinery
247
- # was ~a quarter of the consumer walk). Doc-level
248
- # WeakMap, generation-stamped into one Integer
249
- # (immediates make safe weak values): one C document
250
- # read plus one map hit per bare read. Entries die
251
- # with their documents; a stale generation re-derives.
240
+ # Marker presence is a DOCUMENT fact, memoized per
241
+ # wrapper: one Integer stamp ivar (generation << 1 |
242
+ # bearing) — an ivar read + compare per bare read,
243
+ # versus the old doc-WeakMap hit which cost a bind_call
244
+ # plus a map lookup, more than the attribute read
245
+ # itself. A stale generation re-derives; stamps die
246
+ # with their wrappers (wrapper lifetime = doc scope).
252
247
  def doc_entity_bearing?
253
- doc = NN_DOCUMENT.bind_call(self)
254
- memo = ENTITY_DOC_MEMO[doc]
248
+ stamp = @doc_entity_stamp
255
249
  gen = ::Moxml::Adapter::Leptris.serialize_generation
256
- return memo.allbits?(1) if memo && (memo >> 1) == gen
250
+ return stamp.allbits?(1) if stamp && (stamp >> 1) == gen
257
251
 
258
252
  bearing = ::Moxml::Adapter::Leptris.entity_bearing?(self)
259
- ENTITY_DOC_MEMO[doc] = (gen << 1) | (bearing ? 1 : 0)
253
+ @doc_entity_stamp = (gen << 1) | (bearing ? 1 : 0)
260
254
  bearing
261
255
  end
262
256
 
data/lib/moxml/cdata.rb CHANGED
@@ -13,8 +13,6 @@ module Moxml
13
13
  end
14
14
 
15
15
  # See Moxml::Text#text — Node#text's base is "" for non-elements.
16
- def text
17
- content
18
- end
16
+ alias_method :text, :content
19
17
  end
20
18
  end
data/lib/moxml/comment.rb CHANGED
@@ -15,8 +15,6 @@ module Moxml
15
15
  end
16
16
 
17
17
  # See Moxml::Text#text — Node#text's base is "" for non-elements.
18
- def text
19
- content
20
- end
18
+ alias_method :text, :content
21
19
  end
22
20
  end
data/lib/moxml/text.rb CHANGED
@@ -25,9 +25,8 @@ module Moxml
25
25
  # Node#text's base returns "" for non-element nodes; a text
26
26
  # node's text IS its content (leptris's Reads layer already
27
27
  # answered content here — the wrapper contract now matches on
28
- # every adapter).
29
- def text
30
- content
31
- end
28
+ # every adapter). Aliased, not delegated: text rides the
29
+ # walk-hot read path (moxml#336) and pays one frame, not two.
30
+ alias_method :text, :content
32
31
  end
33
32
  end
data/lib/moxml/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Moxml
4
- VERSION = "0.5.86"
4
+ VERSION = "0.5.88"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moxml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.86
4
+ version: 0.5.88
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-09-26 00:00:00.000000000 Z
11
+ date: 2026-09-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  Moxml is a unified XML manipulation library that provides a common API