summaryrefslogtreecommitdiff
path: root/lib/bundler/definition.rb
diff options
context:
space:
mode:
authorDavid Rodriguez <deivid.rodriguez@riseup.net>2024-01-26 10:41:00 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2024-02-08 14:43:56 +0900
commitc236212600ff3094fea3b138ee0ff98652d94345 (patch)
treece0a80b35de118351672dac692a1c61b5dba657a /lib/bundler/definition.rb
parent0c71fb4b865d1902bd3eed2265d988e4e3fda926 (diff)
[rubygems/rubygems] Use deprecation helper for deprecation warning
https://github.com/rubygems/rubygems/commit/d1963bf1a6
Diffstat (limited to 'lib/bundler/definition.rb')
-rw-r--r--lib/bundler/definition.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 32a7089925..c8faf77b3b 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -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)