yeptris 0.1.8.0 → 0.1.8.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: 8f48d3d0a1b9ba1ec661cbc53959d23cb424add2e0da35a451dca29513ddfb6e
4
- data.tar.gz: af8e88fd3f0a7f12782d79b92616af0ddc417dba4d3aad2dea84fa425b475535
3
+ metadata.gz: cce504357e9e57226d9b6011ee06517ece957d208069248c7d8cad4730e07bf3
4
+ data.tar.gz: 4c9e00bc652956849708b2947762acfa89310122fedcce225390251ab079b4d1
5
5
  SHA512:
6
- metadata.gz: 947c128d09e579dc0343e0b1b57a6b2af168d2f9901f25a109464b810bbcbe02e8e4b85eca38bb3fddb89071c1fcf7205081b9a41d390c8c00ac63652b2cfbdf
7
- data.tar.gz: 824ff9984c5ee2fa439f672e8ce913bccb754a20059885cd4702107d9b13c1e945719702e2b587b59bed20f6338563ffa38bb43461a92a07b5cc048e3640f052
6
+ metadata.gz: 8c9f7bad9c4990646c33145483ddfe7f3b398c5293797704b666b6826129178573c48ff073a480c40c8ef659e11e3856d173565e2809f6dd16e016277a546af8
7
+ data.tar.gz: 7ab59b9e81f80fdcbe13b67220d01eccc4104a06dbb9d653cc801dfa3f2c93e9a9093f55771d849c5031328ddea219012865fd9d38f1978a38645507e6f19709
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Yeptris
4
- VERSION = "0.1.8.0"
4
+ VERSION = "0.1.8.1"
5
5
  end
data/lib/yeptris/yaml.rb CHANGED
@@ -85,7 +85,7 @@ module Yeptris
85
85
 
86
86
  def dump(obj, canonical: false)
87
87
  parts = []
88
- blob = +""
88
+ blob = String.new(encoding: Encoding::BINARY)
89
89
  off = [0]
90
90
  # one pack per SCALAR; containers reuse frozen constants
91
91
  emit = lambda do |op, style, o, len|
@@ -134,10 +134,13 @@ module Yeptris
134
134
  end
135
135
 
136
136
  def scalar(text, plain, emit, blob, off)
137
- bytes = text.b
138
- emit.call(SCALAR, plain ? STYLE_PLAIN : STYLE_DQ, off[0], bytes.bytesize)
139
- blob << bytes
140
- off[0] += bytes.bytesize
137
+ # a BINARY blob absorbs any String bytewise (String#<< on
138
+ # ASCII-8BIT is compatible with every encoding) — the old
139
+ # text.b made a throwaway copy of every scalar before the
140
+ # blob's own copy
141
+ emit.call(SCALAR, plain ? STYLE_PLAIN : STYLE_DQ, off[0], text.bytesize)
142
+ blob << text
143
+ off[0] += text.bytesize
141
144
  end
142
145
 
143
146
  def key_text(k)
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.8.0
4
+ version: 0.1.8.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
@@ -55,7 +54,6 @@ metadata:
55
54
  homepage_uri: https://github.com/leptris/yeptris
56
55
  source_code_uri: https://github.com/leptris/yeptris
57
56
  changelog_uri: https://github.com/leptris/yeptris/releases
58
- post_install_message:
59
57
  rdoc_options: []
60
58
  require_paths:
61
59
  - lib
@@ -70,8 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
68
  - !ruby/object:Gem::Version
71
69
  version: '0'
72
70
  requirements: []
73
- rubygems_version: 3.5.22
74
- signing_key:
71
+ rubygems_version: 4.0.16
75
72
  specification_version: 4
76
73
  summary: 'The YAML counterpart of libleptris: ultra-performance YAML 1.2 for Ruby'
77
74
  test_files: []