yeptris 0.1.9.0 → 0.1.9.1

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: fc05131c548dba9aca39f3157ed680df4bae45e01518b1a1219f4b3e99ff543e
4
- data.tar.gz: '090cf83cfb6caf18200bbb866ddff3dbe3bc2d7d5cadb3eb519f29e72173b37e'
3
+ metadata.gz: 37399f2c725f273fca2b28356aafdc7fec1b1c968858b5a453c1793c8f008638
4
+ data.tar.gz: ef07bb2344d914761632487d27ebc730888184782b2922658b68c0352f396943
5
5
  SHA512:
6
- metadata.gz: 5fb9d0b127656f7c52ec3aaa6a55daafc4aa3bb72cc4b2ae581ae64a71f4f5b97e0dba4876f832f13febbee436e30328399dfe72e0a10f8b73f4067a64779bde
7
- data.tar.gz: 6993520eabd0e4fc0a7bd8775f978f1a96a3b1cd04d7300b7f867bf7aedd4d9d562b37f70d1b4268fb72791c344e5e9df2ece0f09995dac5b84835a4b554c3b2
6
+ metadata.gz: ef0e5f4ebed7940c87eaf00ac2a71c62323bacb598dccca39366c84c0d7ca0847427a89e1d696d6ac65369324cd84fae06d551f7e7095b79cbf76a06d7515741
7
+ data.tar.gz: d2e0b25b0f01a8788ce263c441e3bddd2c674f941928c92aabec59da45db922c6dea9f27f01fab1cfb8fb4d7802da1032f897ac0fd17f4c3f537d4f4ab8204c9
@@ -253,7 +253,7 @@ module Yeptris
253
253
  end
254
254
 
255
255
  def find_anchored(node, name)
256
- return node if node.respond_to?(:anchor) && node.anchor == name
256
+ return node if node.anchor == name
257
257
 
258
258
  node.children.each do |c|
259
259
  found = find_anchored(c, name)
data/lib/yeptris/psych.rb CHANGED
@@ -86,7 +86,7 @@ module Yeptris
86
86
  (0...doc.document_count).each do |i|
87
87
  stream.children << Nodes::Builder.document_stream_child(doc, i)
88
88
  end
89
- stream.instance_variable_set(:@owner, doc)
89
+ stream.owner = doc
90
90
  ObjectSpace.define_finalizer(
91
91
  stream, proc { doc.free unless doc.freed? }
92
92
  )
@@ -164,12 +164,24 @@ module Yeptris
164
164
 
165
165
  attr_reader :children
166
166
  attr_reader :handle # @api private — the Yeptris::Node
167
+ # @api private — the tree builder attaches handles; a writer,
168
+ # never instance_variable_set from outside
169
+ attr_writer :handle
170
+ # The Document owning this tree's C memory; a plain writer —
171
+ # never instance_variable_set from outside (encapsulation law).
172
+ attr_accessor :owner
167
173
 
168
174
  def initialize(handle = nil, children = [])
169
175
  @handle = handle
170
176
  @children = children
171
177
  end
172
178
 
179
+ # Every node HAS an anchor concept (none by default) — the
180
+ # anchored search needs no type probe, just the model.
181
+ def anchor
182
+ nil
183
+ end
184
+
173
185
  def each(&block)
174
186
  @children.each(&block)
175
187
  end
@@ -272,7 +284,7 @@ module Yeptris
272
284
  def document_stream_child(doc, index)
273
285
  root = doc.root(index)
274
286
  d = Document.new
275
- d.instance_variable_set(:@handle, root&.document)
287
+ d.handle = root&.document
276
288
  d.children << node(root) if root
277
289
  d
278
290
  end
@@ -285,21 +297,21 @@ module Yeptris
285
297
  m.children << node(k)
286
298
  m.children << node(v)
287
299
  end
288
- m.instance_variable_set(:@handle, n)
300
+ m.handle = n
289
301
  m
290
302
  when :sequence
291
303
  s = Sequence.new(anchor: n.anchor, tag: n.tag)
292
304
  n.each { |e| s.children << node(e) }
293
- s.instance_variable_set(:@handle, n)
305
+ s.handle = n
294
306
  s
295
307
  when :alias
296
308
  a = Alias.new(n.value)
297
- a.instance_variable_set(:@handle, n)
309
+ a.handle = n
298
310
  a
299
311
  else
300
312
  sc = Scalar.new(n.value, anchor: n.anchor, tag: n.tag,
301
313
  plain: n.style == :plain, style: n.style)
302
- sc.instance_variable_set(:@handle, n)
314
+ sc.handle = n
303
315
  sc
304
316
  end
305
317
  end
data/lib/yeptris.rb CHANGED
@@ -1,8 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "yeptris/version"
4
-
5
3
  module Yeptris
4
+ # The gem's version lives in the parent namespace's file — the last
5
+ # internal require (yeptris/version) retired with it.
6
+ VERSION = "0.1.9.1".freeze
6
7
  # The error hierarchy lives in THIS file (the parent namespace's
7
8
  # own file): nested constants do not trigger a parent-constant
8
9
  # autoload, and the law forbids internal requires — defining the
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yeptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9.0
4
+ version: 0.1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-09-06 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: ffi
@@ -45,7 +44,6 @@ files:
45
44
  - lib/yeptris/psych/parser.rb
46
45
  - lib/yeptris/psych/visitors.rb
47
46
  - lib/yeptris/valueml.rb
48
- - lib/yeptris/version.rb
49
47
  - lib/yeptris/yaml.rb
50
48
  homepage: https://github.com/leptris/yeptris
51
49
  licenses:
@@ -54,7 +52,6 @@ metadata:
54
52
  homepage_uri: https://github.com/leptris/yeptris
55
53
  source_code_uri: https://github.com/leptris/yeptris
56
54
  changelog_uri: https://github.com/leptris/yeptris/releases
57
- post_install_message:
58
55
  rdoc_options: []
59
56
  require_paths:
60
57
  - lib
@@ -69,8 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
66
  - !ruby/object:Gem::Version
70
67
  version: '0'
71
68
  requirements: []
72
- rubygems_version: 3.5.22
73
- signing_key:
69
+ rubygems_version: 4.0.16
74
70
  specification_version: 4
75
71
  summary: 'The YAML counterpart of libleptris: ultra-performance YAML 1.2 for Ruby'
76
72
  test_files: []
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Yeptris
4
- VERSION = "0.1.9.0"
5
- end