Skip to content

Commit 03a0c4e

Browse files
deivid-rodriguezhsbt
authored andcommitted
Rename "gem" to "name"
The name "gem" could be confused with RubyGems activation method.
1 parent 433f4e3 commit 03a0c4e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/bundled_gems.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ def self.warning?(name, specs: nil)
137137
end + build_message(name)
138138
end
139139

140-
def self.build_message(gem)
141-
msg = " #{RUBY_VERSION < SINCE[gem] ? "will no longer be" : "is not"} part of the default gems starting from Ruby #{SINCE[gem]}."
140+
def self.build_message(name)
141+
msg = " #{RUBY_VERSION < SINCE[name] ? "will no longer be" : "is not"} part of the default gems starting from Ruby #{SINCE[name]}."
142142

143143
if defined?(Bundler)
144-
msg += "\nYou can add #{gem} to your Gemfile or gemspec to silence this warning."
144+
msg += "\nYou can add #{name} to your Gemfile or gemspec to silence this warning."
145145

146146
# We detect the gem name from caller_locations. First we walk until we find `require`
147147
# then take the first frame that's not from `require`.
@@ -179,11 +179,11 @@ def self.build_message(gem)
179179
end
180180
end
181181
if caller_gem
182-
msg += "\nAlso please contact the author of #{caller_gem} to request adding #{gem} into its gemspec."
182+
msg += "\nAlso please contact the author of #{caller_gem} to request adding #{name} into its gemspec."
183183
end
184184
end
185185
else
186-
msg += " Install #{gem} from RubyGems."
186+
msg += " Install #{name} from RubyGems."
187187
end
188188

189189
msg

0 commit comments

Comments
 (0)