yeptris 0.6.31.1-aarch64-linux → 0.6.31.2-aarch64-linux

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/yeptris/yaml.rb +6 -1
  3. data/lib/yeptris.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 823350a5f2509594f057eadbd9f31b56dc3ff0c2aa24d4c850266d31f309c59a
4
- data.tar.gz: 9a66a975c9e3763a9be31aaa9c2ae5d288dce80edc66f18941acaec665e48797
3
+ metadata.gz: 183da7797c7f5b350cd690df5ce9d68192e876b67d9d894d86e699fd525f893a
4
+ data.tar.gz: b650b33d6927a1ebb0659925eac2fadf73bd7a55bf87a7c3b5acf140a1463209
5
5
  SHA512:
6
- metadata.gz: f7dde656083f9cb84777c98ecdf01184d6d91dcc6d2357a64d008ac181121e1a871fe4a4fc4d87978722890b85e4853b5c26e35b3d24040287b11f3c25c3cb42
7
- data.tar.gz: f841bd6760d2c58d739fecf3f91a565be23c13f8a94bb1409736f669c1a1c53bb14895f92ece4b3c9ca0d728c305fe368e7d400aa6cb3a46c7431056660aac8a
6
+ metadata.gz: c215e725c05e52335ac398ce44bf5a28f33456e7941da00bc4349f6a0715629fe14f87cfe7e558e00ca6c0406253677d9a1fff5bc03dab95ae2591dc88b3d72d
7
+ data.tar.gz: 30307baad810806be2ba5007d544d1f1de11151d38f21a93dd040289bb6dbb392b242fd6897c30c9b8cd37b67fa43343c698513c4fc22e4d3790151d85dc311c
data/lib/yeptris/yaml.rb CHANGED
@@ -263,7 +263,7 @@ module Yeptris
263
263
  return true
264
264
  end
265
265
  return false if s.empty? || s != s.strip
266
- return false if s.match?(/[\n\t]/)
266
+ return false if s.match?(/[\n\t\u0085\u2028\u2029\uFEFF]/)
267
267
  c = s[0]
268
268
  return false if "#,[]{}&*!|>'\"%@`".include?(c)
269
269
  return false if "-?:".include?(c) && (s.length == 1 || s[1] =~ /[ \t]/)
@@ -309,7 +309,12 @@ module Yeptris
309
309
  return :double if !s.empty? && !s.include?('"') && s.match?(/\A[^[:word:]]/)
310
310
  return :single if s.match?(/\A0[0-7]*[89]/)
311
311
  return :plain if plain_string?(s)
312
+ # the Unicode breaks are YAML breaks like \n (raw, re-parse
313
+ # folds them) and U+FEFF raw is the BOM (re-parse strips it) —
314
+ # only the double-quoted escapes carry them byte-stably; psych
315
+ # double-quotes them all (Psych.dump("b\u0085c") == "b\\Nb")
312
316
  return :double if s.each_byte.any? { |b| b < 0x20 || b == 0x7f }
317
+ return :double if s.match?(/[\u0085\u2028\u2029\uFEFF]/)
313
318
  :single
314
319
  end
315
320
 
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.31.1".freeze
6
+ VERSION = "0.6.31.2".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.31.1
4
+ version: 0.6.31.2
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Ribose Inc.