From 248fae0ec43c2df6d9b545acc7f56bdfd5f89dec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 11 Nov 2021 23:58:40 +0100 Subject: [rubygems/rubygems] Improve sources representation We have two representations of a source. Once used for sorting, which should not depend on the source's state, but solely on its static information, like remotes. Another one used for error and informational messages, which should properly inform about the exact state of the source when the message is printed. This commit makes the latter be the default implementation of `to_s`, so that error and informational messages are more accurate by default. https://github.com/rubygems/rubygems/commit/b5f2b88957 --- lib/bundler/plugin/api/source.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/bundler/plugin') diff --git a/lib/bundler/plugin/api/source.rb b/lib/bundler/plugin/api/source.rb index f6f4ac4f0a..32b1d0ee38 100644 --- a/lib/bundler/plugin/api/source.rb +++ b/lib/bundler/plugin/api/source.rb @@ -283,6 +283,7 @@ module Bundler def to_s "plugin source for #{@type} with uri #{@uri}" end + alias_method :identifier, :to_s # Note: Do not override if you don't know what you are doing. def include?(other) -- cgit v1.2.3