diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2026-03-09 16:05:05 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2026-03-09 07:59:47 +0000 |
| commit | 4da2b2d912b750d681b5a78ee8d4bba7a9015040 (patch) | |
| tree | b3adeaa0e0c78fcfbb20819914a701348bfbc6a5 | |
| parent | 6425157eae086f3c50c7055a936daab4647d6090 (diff) | |
[ruby/rubygems] Remove redundant SafeYAML.load and update tests
https://github.com/ruby/rubygems/commit/fa4771bcf5
| -rw-r--r-- | lib/rubygems/safe_yaml.rb | 11 | ||||
| -rw-r--r-- | test/rubygems/helper.rb | 2 |
2 files changed, 1 insertions, 12 deletions
diff --git a/lib/rubygems/safe_yaml.rb b/lib/rubygems/safe_yaml.rb index 223c50ce33..c59b465358 100644 --- a/lib/rubygems/safe_yaml.rb +++ b/lib/rubygems/safe_yaml.rb @@ -50,17 +50,6 @@ module Gem def self.load(input) if Gem.use_psych? - ::Psych.safe_load(input, permitted_classes: [::Symbol]) - else - Gem::YAMLSerializer.load( - input, - permitted_classes: [::Symbol] - ) - end - end - - def self.unsafe_load(input) - if Gem.use_psych? if ::Psych.respond_to?(:unsafe_load) ::Psych.unsafe_load(input) else diff --git a/test/rubygems/helper.rb b/test/rubygems/helper.rb index ec373d41e0..783818b6eb 100644 --- a/test/rubygems/helper.rb +++ b/test/rubygems/helper.rb @@ -738,7 +738,7 @@ class Gem::TestCase < Test::Unit::TestCase # Load a YAML string, the psych 3 way def load_yaml(yaml) - Gem::SafeYAML.safe_load(yaml) + Gem::SafeYAML.load(yaml) end ## |
