Skip to content

Commit b32be07

Browse files
committed
[SafeYAML] Avoid warning when Gem::Deprecate.skip is set
1 parent 8271915 commit b32be07

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/rubygems/safe_yaml.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ def self.load input
3535
::YAML.safe_load(input, [::Symbol])
3636
end
3737
else
38-
warn "YAML safe loading is not available. Please upgrade psych to a version that supports safe loading (>= 2.0)."
38+
unless Gem::Deprecate.skip
39+
warn "YAML safe loading is not available. Please upgrade psych to a version that supports safe loading (>= 2.0)."
40+
end
41+
3942
def self.safe_load input, *args
4043
::YAML.load input
4144
end

0 commit comments

Comments
 (0)