yeptris 0.6.66.0-arm-linux-eabihf → 0.6.66.1-arm-linux-eabihf

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: dd7a22353e3793afe0325d21945a8ca57f363c119ab7ee3b2ea7b87bc9e598b5
4
- data.tar.gz: 21910ea72c51aa69dfdab20c91b0df947a363cdf73a98645d4348b8274c451b2
3
+ metadata.gz: 49cc31b7ada238fe928bb7877bc1f53fbbbc351e8d09dd3897c9edbd08fe6e11
4
+ data.tar.gz: 47cbea160c515e03d74621ba7b1de744fb4fa795ded6b4caa8ab06a1ece3f15e
5
5
  SHA512:
6
- metadata.gz: 446d4615afd15df2819b49b7c0934e4838fc2531958db6c2f10157ffd1dc8d434bac70b032a2a0603fa5bb8a98cc66a9539b69afd5a9c855922e4cd5cdb93ac4
7
- data.tar.gz: c42411600719f05a3974e965df6154eacc9ca17568977dbfdf7e8b4fc72db080060289ad0a3e69bdb8f49ff95eff18df2982f57359a375e0dde89a411e4e9281
6
+ metadata.gz: 93bcdca560bfbf2137db031f5e7755025961ecc86ccaa52091d254793d470ed4e4b06c4d099bf0831a1053bba156a639a4512ed9003111c483ee21145f4a0509
7
+ data.tar.gz: be937ae0e61c92e4ed46176198a21710a550154a05c094742e55f09668bb78d58c46cf37ae94503344f07e342ac54cc32ade2b35140c3c24ba05a31499e35327
@@ -281,7 +281,10 @@ module Yeptris
281
281
 
282
282
  # the arena is UTF-8 by construction (validated at parse), so
283
283
  # forcing its encoding ONCE makes every slice UTF-8 for free —
284
- # no per-scalar force_encoding
284
+ # no per-scalar force_encoding. The record offsets are BYTES:
285
+ # slice with byteslice, never String#[] — on a UTF-8 String that
286
+ # counts characters and drifts after the first multibyte char
287
+ # (#1359)
285
288
  arena.force_encoding(Encoding::UTF_8)
286
289
  # (each_slice DESTRUCTURING measured SLOWER than plain indexing
287
290
  # here: it allocates a 12-slot Array per record. Index away.)
@@ -296,18 +299,18 @@ module Yeptris
296
299
  # not the text
297
300
  tag_id = flat[i + 3]
298
301
  v = Materializer.scan_by_tag(
299
- arena[flat[i + 8], flat[i + 9]], tag_id, (flat[i + 2] & EF_IMPLICIT) != 0
302
+ arena.byteslice(flat[i + 8], flat[i + 9]), tag_id, (flat[i + 2] & EF_IMPLICIT) != 0
300
303
  )
301
304
  # !ruby/symbol (#258): the tag TEXT (not the resolver tag_id)
302
305
  # decides — psych deserializes the scalar to a Symbol, the
303
306
  # same arm the DOM walk carries (Node#scalar_to_ruby)
304
307
  tl = flat[i + 13]
305
308
  if tl != 0
306
- t = arena[flat[i + 12], tl]
309
+ t = arena.byteslice(flat[i + 12], tl)
307
310
  v = v.to_sym if t == "!ruby/symbol" || t == "tag:ruby.yaml.org,2002:symbol"
308
311
  end
309
312
  l = flat[i + 11]
310
- anchors[arena[flat[i + 10], l]] = v if l != 0
313
+ anchors[arena.byteslice(flat[i + 10], l)] = v if l != 0
311
314
  # place(): the scalar fast path inlined — the overwhelming
312
315
  # majority of events land here
313
316
  if stack.empty?
@@ -333,7 +336,7 @@ module Yeptris
333
336
  when MAPPING_START
334
337
  h = {}
335
338
  l = flat[i + 11]
336
- anchors[arena[flat[i + 10], l]] = h if l != 0
339
+ anchors[arena.byteslice(flat[i + 10], l)] = h if l != 0
337
340
  merge_target.push(place(docs, stack, pending_key, pending_key_merge, h))
338
341
  stack.push(h)
339
342
  pending_key.push(nil)
@@ -341,13 +344,13 @@ module Yeptris
341
344
  when SEQUENCE_START
342
345
  a = []
343
346
  l = flat[i + 11]
344
- anchors[arena[flat[i + 10], l]] = a if l != 0
347
+ anchors[arena.byteslice(flat[i + 10], l)] = a if l != 0
345
348
  merge_target.push(place(docs, stack, pending_key, pending_key_merge, a))
346
349
  stack.push(a)
347
350
  pending_key.push(nil)
348
351
  pending_key_merge.push(nil)
349
352
  when ALIAS
350
- name = arena[flat[i + 8], flat[i + 9]]
353
+ name = arena.byteslice(flat[i + 8], flat[i + 9])
351
354
  # the engine DOM parse's spelling, with the record's own
352
355
  # location — the ONE undefined-anchor phrase every face
353
356
  # raises (the facade's AnchorNotDefined lift matches on it)
data/lib/yeptris/psych.rb CHANGED
@@ -617,7 +617,8 @@ module Yeptris
617
617
  # the permitted set. Records are 14 fields, type first
618
618
  # (Materializer::FIELDS; the #179 layout puts end_line/end_col
619
619
  # at 6/7, the value at 8/9, the anchor at 10/11 and the tag
620
- # text at 12/13 — the walk() reads are the SSOT).
620
+ # text at 12/13 — the walk() reads are the SSOT). Offsets are
621
+ # bytes: byteslice, whatever the arena's encoding (#1359).
621
622
  def check_records(flat, arena, permitted, aliases_enabled)
622
623
  # The timestamp gate needs the RESOLVED class only when the
623
624
  # permitted set cannot absorb both answers (the facade default
@@ -633,7 +634,7 @@ module Yeptris
633
634
  else
634
635
  l = flat[i + 13]
635
636
  if l != 0
636
- tag = arena[flat[i + 12], l]
637
+ tag = arena.byteslice(flat[i + 12], l)
637
638
  # the bare non-specific tag (`! ''` — the nil-key form,
638
639
  # #300): the DOM face normalized it away (node.tag nil),
639
640
  # the record keeps it verbatim — it names no class and is
@@ -666,7 +667,7 @@ module Yeptris
666
667
  # resolves to String there and psych likewise yields a
667
668
  # String (no gate — plain data).
668
669
  if gate_ts && type == m::SCALAR && flat[i + 3] == m::TAG_TIMESTAMP
669
- resolved = m.parse_timestamp(arena[flat[i + 8], flat[i + 9]])
670
+ resolved = m.parse_timestamp(arena.byteslice(flat[i + 8], flat[i + 9]))
670
671
  klass = resolved.class
671
672
  if (klass == ::Date || klass == ::Time) && !permitted.include?(klass)
672
673
  raise DisallowedClass, klass.name
data/lib/yeptris.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  module Yeptris
4
4
  # The gem's version lives in the parent namespace's file — the last
5
5
  # internal require (yeptris/version) retired with it.
6
- VERSION = "0.6.66.0".freeze
6
+ VERSION = "0.6.66.1".freeze
7
7
 
8
8
  # Informational notices are OPT-IN (yeptris-ruby#217): consumers
9
9
  # embed yeptris inside CLIs that assert clean stderr, and a
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yeptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.66.0
4
+ version: 0.6.66.1
5
5
  platform: arm-linux-eabihf
6
6
  authors:
7
7
  - Ribose Inc.