diff options
| author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2025-08-13 11:54:46 +0200 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-09-03 23:38:37 +0900 |
| commit | 2e65f4ac3b1d69e7bd9e3e65a696e7f234ec9527 (patch) | |
| tree | 393c8b9d5dbffde2a1149caaa0231589222fc9fd | |
| parent | 9763e2de016606e4ffdaf83c2ad4da436d4a585d (diff) | |
[rubygems/rubygems] No need to print caller location when raising directly
https://github.com/rubygems/rubygems/commit/6c2b06cc16
| -rw-r--r-- | lib/bundler/shared_helpers.rb | 1 | ||||
| -rw-r--r-- | spec/bundler/bundler/shared_helpers_spec.rb | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index 2bdaabdaa7..b020c67143 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -130,7 +130,6 @@ module Bundler caller_location = caller_locations(2, 2).first suffix = " (called at #{caller_location.path}:#{caller_location.lineno})" message += suffix - removed_message += suffix if removed_message end require_relative "../bundler" diff --git a/spec/bundler/bundler/shared_helpers_spec.rb b/spec/bundler/bundler/shared_helpers_spec.rb index 3568580701..5045b86e4e 100644 --- a/spec/bundler/bundler/shared_helpers_spec.rb +++ b/spec/bundler/bundler/shared_helpers_spec.rb @@ -542,7 +542,7 @@ RSpec.describe Bundler::SharedHelpers do expect { subject.major_deprecation(36, "Message", removed_message: "Removal") }. to raise_error(Bundler::DeprecatedError, "[REMOVED] Removal") expect { subject.major_deprecation(35, "Message", removed_message: "Removal", print_caller_location: true) }. - to raise_error(Bundler::DeprecatedError, /^\[REMOVED\] Removal \(called at .*:\d+\)$/) + to raise_error(Bundler::DeprecatedError, "[REMOVED] Removal") end end end |
