Skip to content

Commit b56aacb

Browse files
deivid-rodriguezmatzbot
authored andcommitted
[rubygems/rubygems] Define a few inspect methods to help debugging
ruby/rubygems@ad26ccde38
1 parent 0914da5 commit b56aacb

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

lib/bundler/endpoint_specification.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ def __swap__(spec)
120120
@remote_specification = spec
121121
end
122122

123+
def inspect
124+
"#<#{self.class} @name=\"#{name}\" (#{full_name.delete_prefix("#{name}-")})>"
125+
end
126+
123127
private
124128

125129
def _remote_specification

lib/bundler/lazy_specification.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ def __materialize__(candidates, fallback_to_non_installable: Bundler.frozen_bund
161161
search
162162
end
163163

164+
def inspect
165+
"#<#{self.class} @name=\"#{name}\" (#{full_name.delete_prefix("#{name}-")})>"
166+
end
167+
164168
def to_s
165169
lock_name
166170
end

lib/bundler/stub_specification.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ def raw_require_paths
116116
stub.raw_require_paths
117117
end
118118

119+
def inspect
120+
"#<#{self.class} @name=\"#{name}\" (#{full_name.delete_prefix("#{name}-")})>"
121+
end
122+
119123
private
120124

121125
def _remote_specification

0 commit comments

Comments
 (0)