[rubygems/rubygems] Use deprecation helper for deprecation warning

https://github.com/rubygems/rubygems/commit/d1963bf1a6
This commit is contained in:
David Rodriguez 2024-01-26 10:41:00 +01:00 committed by Hiroshi SHIBATA
parent 0c71fb4b86
commit c236212600
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2

View File

@ -334,7 +334,9 @@ module Bundler
"Instead, instantiate a new definition passing `#{target_lockfile}`, and call `lock` without a file argument on that definition"
end
warn "Passing a file to `Definition#lock` is deprecated. #{suggestion}"
msg = "`Definition#lock` was passed a target file argument. #{suggestion}"
Bundler::SharedHelpers.major_deprecation 2, msg
end
write_lock(target_lockfile, preserve_unknown_sections)