Skip to content

Commit 7106c8d

Browse files
committed
Auto merge of #2034 - rubygems:seg-no-warning-deprecate-skip, r=olleolleolle
[SafeYAML] Avoid warning when Gem::Deprecate.skip is set # Description: This will allow Bundler to suppress the warnings, so we can get the tests passing again # Tasks: - [ ] Describe the problem / feature - [ ] Write tests - [ ] Write code to solve the problem - [ ] Get code review from coworkers / friends I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md).
2 parents 2b4a113 + b32be07 commit 7106c8d

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)