Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

Commit 5162511

Browse files
committed
Removed self-hosted YAML Serializer, It is not compatible YAML spec in standard library of Ruby
1 parent 0c5d3b8 commit 5162511

4 files changed

Lines changed: 8 additions & 292 deletions

File tree

lib/bundler/plugin/index.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ def load_index(index_file, global = false)
136136

137137
data = index_f.read
138138

139-
require "bundler/yaml_serializer"
140-
index = YAMLSerializer.load(data)
139+
require "bundler/psyched_yaml"
140+
index = YAML.load(data)
141141

142142
@commands.merge!(index["commands"])
143143
@hooks.merge!(index["hooks"])
@@ -159,10 +159,10 @@ def save_index
159159
"sources" => @sources,
160160
}
161161

162-
require "bundler/yaml_serializer"
162+
require "bundler/psyched_yaml"
163163
SharedHelpers.filesystem_access(index_file) do |index_f|
164164
FileUtils.mkdir_p(index_f.dirname)
165-
File.open(index_f, "w") {|f| f.puts YAMLSerializer.dump(index) }
165+
File.open(index_f, "w") {|f| f.puts YAML.dump(index) }
166166
end
167167
end
168168
end

lib/bundler/settings.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,8 @@ def set_key(raw_key, value, hash, file)
370370
return unless file
371371
SharedHelpers.filesystem_access(file) do |p|
372372
FileUtils.mkdir_p(p.dirname)
373-
require "bundler/yaml_serializer"
374-
p.open("w") {|f| f.write(YAMLSerializer.dump(hash)) }
373+
require "bundler/psyched_yaml"
374+
p.open("w") {|f| f.write(YAML.dump(hash)) }
375375
end
376376
end
377377

@@ -424,8 +424,8 @@ def load_config(config_file)
424424
SharedHelpers.filesystem_access(config_file, :read) do |file|
425425
valid_file = file.exist? && !file.size.zero?
426426
return {} unless valid_file
427-
require "bundler/yaml_serializer"
428-
YAMLSerializer.load file.read
427+
require "bundler/psyched_yaml"
428+
YAML.load file.read
429429
end
430430
end
431431

lib/bundler/yaml_serializer.rb

Lines changed: 0 additions & 90 deletions
This file was deleted.

spec/bundler/yaml_serializer_spec.rb

Lines changed: 0 additions & 194 deletions
This file was deleted.

0 commit comments

Comments
 (0)