psych 5.1.1.1 → 5.1.2

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: 32a9f06b7fd5303a77be8b5954d03e5d0c4fc19bff5b22a7e2a68eabe57db15c
4
- data.tar.gz: 41c8fd2459cf1ac9c2e3db8fce51e2b05a0fda1f3666ce18207d1afdd491d0e4
3
+ metadata.gz: 39bdb85aafa27b992e7e8db6905f6e1bc52976bbfc3f71e0ce1adee552a89682
4
+ data.tar.gz: a8d566aa3e16cde752a41ffdb5990af2b2d4f7082ad8774dbd3a8250636fef20
5
5
  SHA512:
6
- metadata.gz: d5e68fc1f4b0698a3eda0e9faa74364058b73364c2adc074d22628d4a98066e04089bda4d81ea5e6aaa41bd7ee69db38dd56c74f7c383a2cdfe3ca1f92acb14b
7
- data.tar.gz: 6d7ca78b6fb6d15c4de16c4c706d2520f55777497e5f967a9fe83b8c5bcd0ffdd29a6122bce320ab09b24ccc4c1d7863b50988f299cdbc164e4c9e6614834071
6
+ metadata.gz: ca436b4d85c8c931bfc9b05d2f16a52f03d01f65c5d708419f75ce926ba55ef9aa4af95a811fec0309773ec6f8963002ffa5ead5cc2f69e1666d3759f24a688b
7
+ data.tar.gz: bc2aabe53f58a0eb15fed477c96767bc4267ce6bd1f929010c580a0891fdbe28517fdf030a09356dd9b84000c60e1fe7d403d2d9414b5b3a7db8bfa152f5ba5a
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Psych
4
4
  # The version of Psych you are using
5
- VERSION = '5.1.1.1'
5
+ VERSION = '5.1.2'
6
6
 
7
7
  if RUBY_ENGINE == 'jruby'
8
8
  DEFAULT_SNAKEYAML_VERSION = '2.7'.freeze
@@ -101,7 +101,7 @@ module Psych
101
101
  source = $1
102
102
  options = 0
103
103
  lang = nil
104
- ($2 || '').split('').each do |option|
104
+ $2&.each_char do |option|
105
105
  case option
106
106
  when 'x' then options |= Regexp::EXTENDED
107
107
  when 'i' then options |= Regexp::IGNORECASE
@@ -15,30 +15,29 @@ module Psych
15
15
  class YAMLTree < Psych::Visitors::Visitor
16
16
  class Registrar # :nodoc:
17
17
  def initialize
18
- @obj_to_id = {}
19
- @obj_to_node = {}
18
+ @obj_to_id = {}.compare_by_identity
19
+ @obj_to_node = {}.compare_by_identity
20
20
  @targets = []
21
21
  @counter = 0
22
22
  end
23
23
 
24
24
  def register target, node
25
- return unless target.respond_to? :object_id
26
25
  @targets << target
27
- @obj_to_node[target.object_id] = node
26
+ @obj_to_node[target] = node
28
27
  end
29
28
 
30
29
  def key? target
31
- @obj_to_node.key? target.object_id
30
+ @obj_to_node.key? target
32
31
  rescue NoMethodError
33
32
  false
34
33
  end
35
34
 
36
35
  def id_for target
37
- @obj_to_id[target.object_id] ||= (@counter += 1)
36
+ @obj_to_id[target] ||= (@counter += 1)
38
37
  end
39
38
 
40
39
  def node_for target
41
- @obj_to_node[target.object_id]
40
+ @obj_to_node[target]
42
41
  end
43
42
  end
44
43
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: psych
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.1.1
4
+ version: 5.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Patterson
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-10-16 00:00:00.000000000 Z
13
+ date: 2023-12-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: stringio
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  requirements: []
117
- rubygems_version: 3.5.0.dev
117
+ rubygems_version: 3.5.1
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: Psych is a YAML parser and emitter