From b56aacba78c95c1d7151c8cb66165fb69510bac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 14 Nov 2024 10:54:15 +0100 Subject: [PATCH] [rubygems/rubygems] Define a few `inspect` methods to help debugging https://github.com/rubygems/rubygems/commit/ad26ccde38 --- lib/bundler/endpoint_specification.rb | 4 ++++ lib/bundler/lazy_specification.rb | 4 ++++ lib/bundler/stub_specification.rb | 4 ++++ 3 files changed, 12 insertions(+) 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