psych 5.2.0.beta1 → 5.2.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5d417b41683c961407366e4a651797b33d94aea7d2be6112847e855e62e7b5a
4
- data.tar.gz: 664df43090f7b9ad7888b82275d76883f6bca98c88c5e7659c74e42f6b5ccd61
3
+ metadata.gz: 2bacbea62b8fe577821515e6dff0eea79e7b02be00c56fa50bc43564b66f58e3
4
+ data.tar.gz: 5143d8ac8e82033fbb90a48fbf548523932b8b9c3e57593912aff6cd64ecde63
5
5
  SHA512:
6
- metadata.gz: 4c670ab925079058a8e483d0fc062ce3c5e39eecc6e7a8a3691f2293e0796253d48a129bd15409a885265a9f130c97fd3379ab1f8a87f95f03d48453b34ec606
7
- data.tar.gz: 87e0765bdec353ab86682bf0462bbae2b3511ac186fa0ae8eb714fe524e3eb673f7e2db82c5fd07931e06df4a713f8f699ceac2dbe94af19b134216f9aa5b9c3
6
+ metadata.gz: 4b259cce94adfb30b206aef9784b76150f1412a050d27810f707cece74be05dac7975b976c8a7b333f94305f0d4a1a0c81f846aa00704ca1ba1eebae1c4919b6
7
+ data.tar.gz: 8a01e7eacb6617d294d8f852b9cfa0d1b987a2f96e8431606dccd2ce190bcc135bd31dca8d6a5435a77a8a72d4bd343fdc99707e125f6cd804d4f6c01962bd23
@@ -13,18 +13,18 @@ module Psych
13
13
  # Base 60, [-+]inf and NaN are handled separately
14
14
  FLOAT = /^(?:[-+]?([0-9][0-9_,]*)?\.[0-9]*([eE][-+][0-9]+)?(?# base 10))$/x
15
15
 
16
- # Taken from http://yaml.org/type/int.html
17
- INTEGER_STRICT = /^(?:[-+]?0b[0-1_]+ (?# base 2)
18
- |[-+]?0[0-7_]+ (?# base 8)
19
- |[-+]?(0|[1-9][0-9_]*) (?# base 10)
20
- |[-+]?0x[0-9a-fA-F_]+ (?# base 16))$/x
16
+ # Taken from http://yaml.org/type/int.html and modified to ensure at least one numerical symbol exists
17
+ INTEGER_STRICT = /^(?:[-+]?0b[_]*[0-1][0-1_]* (?# base 2)
18
+ |[-+]?0[_]*[0-7][0-7_]* (?# base 8)
19
+ |[-+]?(0|[1-9][0-9_]*) (?# base 10)
20
+ |[-+]?0x[_]*[0-9a-fA-F][0-9a-fA-F_]* (?# base 16))$/x
21
21
 
22
22
  # Same as above, but allows commas.
23
23
  # Not to YML spec, but kept for backwards compatibility
24
- INTEGER_LEGACY = /^(?:[-+]?0b[0-1_,]+ (?# base 2)
25
- |[-+]?0[0-7_,]+ (?# base 8)
24
+ INTEGER_LEGACY = /^(?:[-+]?0b[_,]*[0-1][0-1_,]* (?# base 2)
25
+ |[-+]?0[_,]*[0-7][0-7_,]* (?# base 8)
26
26
  |[-+]?(?:0|[1-9](?:[0-9]|,[0-9]|_[0-9])*) (?# base 10)
27
- |[-+]?0x[0-9a-fA-F_,]+ (?# base 16))$/x
27
+ |[-+]?0x[_,]*[0-9a-fA-F][0-9a-fA-F_,]* (?# base 16))$/x
28
28
 
29
29
  attr_reader :class_loader
30
30
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Psych
4
4
  # The version of Psych you are using
5
- VERSION = '5.2.0.beta1'
5
+ VERSION = '5.2.0.beta3'
6
6
 
7
7
  if RUBY_ENGINE == 'jruby'
8
8
  DEFAULT_SNAKEYAML_VERSION = '2.7'.freeze
@@ -36,7 +36,7 @@ module Psych
36
36
 
37
37
  unless @domain_types.empty? || !target.tag
38
38
  key = target.tag.sub(/^[!\/]*/, '').sub(/(,\d+)\//, '\1:')
39
- key = "tag:#{key}" unless key =~ /^(?:tag:|x-private)/
39
+ key = "tag:#{key}" unless key.match?(/^(?:tag:|x-private)/)
40
40
 
41
41
  if @domain_types.key? key
42
42
  value, block = @domain_types[key]
@@ -261,7 +261,7 @@ module Psych
261
261
  style = Nodes::Scalar::LITERAL
262
262
  plain = false
263
263
  quote = false
264
- elsif o =~ /\n(?!\Z)/ # match \n except blank line at the end of string
264
+ elsif o.match?(/\n(?!\Z)/) # match \n except blank line at the end of string
265
265
  style = Nodes::Scalar::LITERAL
266
266
  elsif o == '<<'
267
267
  style = Nodes::Scalar::SINGLE_QUOTED
@@ -272,9 +272,9 @@ module Psych
272
272
  style = Nodes::Scalar::DOUBLE_QUOTED
273
273
  elsif @line_width && o.length > @line_width
274
274
  style = Nodes::Scalar::FOLDED
275
- elsif o =~ /^[^[:word:]][^"]*$/
275
+ elsif o.match?(/^[^[:word:]][^"]*$/)
276
276
  style = Nodes::Scalar::DOUBLE_QUOTED
277
- elsif not String === @ss.tokenize(o) or /\A0[0-7]*[89]/ =~ o
277
+ elsif not String === @ss.tokenize(o) or /\A0[0-7]*[89]/.match?(o)
278
278
  style = Nodes::Scalar::SINGLE_QUOTED
279
279
  end
280
280
 
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: psych
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0.beta1
4
+ version: 5.2.0.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Patterson
8
8
  - SHIBATA Hiroshi
9
9
  - Charles Oliver Nutter
10
+ autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2024-09-09 00:00:00.000000000 Z
13
+ date: 2024-11-07 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: stringio
@@ -97,6 +98,7 @@ licenses:
97
98
  metadata:
98
99
  msys2_mingw_dependencies: libyaml
99
100
  changelog_uri: https://github.com/ruby/psych/releases
101
+ post_install_message:
100
102
  rdoc_options:
101
103
  - "--main"
102
104
  - README.md
@@ -113,7 +115,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
115
  - !ruby/object:Gem::Version
114
116
  version: '0'
115
117
  requirements: []
116
- rubygems_version: 3.6.0.dev
118
+ rubygems_version: 3.5.11
119
+ signing_key:
117
120
  specification_version: 4
118
121
  summary: Psych is a YAML parser and emitter
119
122
  test_files: []