[rubygems/rubygems] Use caller_locations instead of splitting caller

Also limit caller ranges

a274b1af78
This commit is contained in:
Nobuyoshi Nakada 2022-12-14 02:16:43 +09:00 committed by git
parent c639bacd45
commit c032e2c225
4 changed files with 5 additions and 4 deletions

View file

@ -874,7 +874,7 @@ class Gem::Specification < Gem::BasicSpecification
# You probably want to use one of the Enumerable methods instead.
def self.all
warn "NOTE: Specification.all called from #{caller.first}" unless
warn "NOTE: Specification.all called from #{caller(1, 1).first}" unless
Gem::Deprecate.skip
_all
end