yeptris 0.6.31.1-powerpc64le-linux → 0.6.31.2-powerpc64le-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: 70092370a758606dd918856ec1e5ed79565ea2d298820924064e90d1f36e90ff
4
- data.tar.gz: 65eba24c1b61f1b28a983effe65be61e738bd8c4a8b13c6ba5f58a4c4e4fa057
3
+ metadata.gz: 0e9688f533c0a29fb0ab4447d915cebc3b49b2ef4b7fd89ccd01b8987ac306e9
4
+ data.tar.gz: 505362de7b095d280bd29d664d4bac1111743d70eec13a391937c4425dc77a38
5
5
  SHA512:
6
- metadata.gz: 05d6f5d28a281861e36711ab52c3fab6f8720ca8037ca78169bf4f314d6ea9ed2c9505d9ec60d3b5b3dd1bca960f811b0fff8a17d2cced19d249ff873a07bb9d
7
- data.tar.gz: c9482e6fccd9432a951982fc5f8d047df63a098e84acc870b3ef13a6e833f48a69521901cf5aa45f2d755a62f3f6c16fc7fde21408ab1afab42e9861acbb362e
6
+ metadata.gz: 4fd7a0e32448ae590f0656fc46f5fcccabd80a6253fffcf57a730de3ab6453fa92d6750532bfedacea398ddc9d865e3e7743afd1356f82f7c34387f5b66cb3a5
7
+ data.tar.gz: b9c26e0e5c8f20d0b688bead87ce58f3c9ce9ffbe9634393732ca2f45713f999b29e356aecc09df7a364cf3d2278e9c2e2eec1f9e289cb35272522999463da5f
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: powerpc64le-linux
6
6
  authors:
7
7
  - Ribose Inc.