Skip to content

Commit 4da2b2d

Browse files
hsbtmatzbot
authored andcommitted
[ruby/rubygems] Remove redundant SafeYAML.load and update tests
ruby/rubygems@fa4771bcf5
1 parent 6425157 commit 4da2b2d

2 files changed

Lines changed: 1 addition & 12 deletions

File tree

lib/rubygems/safe_yaml.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,6 @@ def self.safe_load(input)
4949
end
5050

5151
def self.load(input)
52-
if Gem.use_psych?
53-
::Psych.safe_load(input, permitted_classes: [::Symbol])
54-
else
55-
Gem::YAMLSerializer.load(
56-
input,
57-
permitted_classes: [::Symbol]
58-
)
59-
end
60-
end
61-
62-
def self.unsafe_load(input)
6352
if Gem.use_psych?
6453
if ::Psych.respond_to?(:unsafe_load)
6554
::Psych.unsafe_load(input)

test/rubygems/helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ def write_dummy_extconf(gem_name)
738738
# Load a YAML string, the psych 3 way
739739

740740
def load_yaml(yaml)
741-
Gem::SafeYAML.safe_load(yaml)
741+
Gem::SafeYAML.load(yaml)
742742
end
743743

744744
##

0 commit comments

Comments
 (0)