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 +4 -4
- data/lib/psych/versions.rb +1 -1
- data/lib/psych/visitors/to_ruby.rb +1 -1
- data/lib/psych/visitors/yaml_tree.rb +6 -7
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39bdb85aafa27b992e7e8db6905f6e1bc52976bbfc3f71e0ce1adee552a89682
|
4
|
+
data.tar.gz: a8d566aa3e16cde752a41ffdb5990af2b2d4f7082ad8774dbd3a8250636fef20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca436b4d85c8c931bfc9b05d2f16a52f03d01f65c5d708419f75ce926ba55ef9aa4af95a811fec0309773ec6f8963002ffa5ead5cc2f69e1666d3759f24a688b
|
7
|
+
data.tar.gz: bc2aabe53f58a0eb15fed477c96767bc4267ce6bd1f929010c580a0891fdbe28517fdf030a09356dd9b84000c60e1fe7d403d2d9414b5b3a7db8bfa152f5ba5a
|
data/lib/psych/versions.rb
CHANGED
@@ -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
|
26
|
+
@obj_to_node[target] = node
|
28
27
|
end
|
29
28
|
|
30
29
|
def key? target
|
31
|
-
@obj_to_node.key? target
|
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
|
36
|
+
@obj_to_id[target] ||= (@counter += 1)
|
38
37
|
end
|
39
38
|
|
40
39
|
def node_for target
|
41
|
-
@obj_to_node[target
|
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.
|
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-
|
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.
|
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
|