diff options
| author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2024-11-14 10:54:15 +0100 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-11-19 16:50:04 +0000 |
| commit | b56aacba78c95c1d7151c8cb66165fb69510bac3 (patch) | |
| tree | 3bea4b60754479e0ca4e2a379fc7b6e58b8e6edd | |
| parent | 0914da52e005bacd75bf8b943a3c3e0bafc05a37 (diff) | |
[rubygems/rubygems] Define a few `inspect` methods to help debugging
https://github.com/rubygems/rubygems/commit/ad26ccde38
| -rw-r--r-- | lib/bundler/endpoint_specification.rb | 4 | ||||
| -rw-r--r-- | lib/bundler/lazy_specification.rb | 4 | ||||
| -rw-r--r-- | lib/bundler/stub_specification.rb | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/lib/bundler/endpoint_specification.rb b/lib/bundler/endpoint_specification.rb index 712ea60a1b..e4780a1c2a 100644 --- a/lib/bundler/endpoint_specification.rb +++ b/lib/bundler/endpoint_specification.rb @@ -120,6 +120,10 @@ module Bundler @remote_specification = spec end + def inspect + "#<#{self.class} @name=\"#{name}\" (#{full_name.delete_prefix("#{name}-")})>" + end + private def _remote_specification diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb index 1618750b40..4c21297b0e 100644 --- a/lib/bundler/lazy_specification.rb +++ b/lib/bundler/lazy_specification.rb @@ -161,6 +161,10 @@ module Bundler search end + def inspect + "#<#{self.class} @name=\"#{name}\" (#{full_name.delete_prefix("#{name}-")})>" + end + def to_s lock_name end diff --git a/lib/bundler/stub_specification.rb b/lib/bundler/stub_specification.rb index 1d4a22399b..026f753d41 100644 --- a/lib/bundler/stub_specification.rb +++ b/lib/bundler/stub_specification.rb @@ -116,6 +116,10 @@ module Bundler stub.raw_require_paths end + def inspect + "#<#{self.class} @name=\"#{name}\" (#{full_name.delete_prefix("#{name}-")})>" + end + private def _remote_specification |
