Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix shadowed local variable warning

  • Loading branch information...
commit 9d8bf0804d731d16a7288f71e1874a76eb9e51a9 1 parent dbbe9b3
@drbrain drbrain authored
Showing with 7 additions and 6 deletions.
  1. +7 −6 lib/rubygems/custom_require.rb
View
13 lib/rubygems/custom_require.rb
@@ -38,15 +38,16 @@ def require path
spec = Gem.searcher.find_active path
unless spec then
- specs = Gem.searcher.find_in_unresolved path
- unless specs.empty? then
- specs = [specs.last]
+ found_specs = Gem.searcher.find_in_unresolved path
+ unless found_specs.empty? then
+ found_specs = [found_specs.last]
else
- specs = Gem.searcher.find_in_unresolved_tree path
+ found_specs = Gem.searcher.find_in_unresolved_tree path
end
- specs.each do |spec|
- Gem.activate spec.name, spec.version # FIX: this is dumb
+ found_specs.each do |found_spec|
+ # FIX: this is dumb, activate a spec instead of name/version
+ Gem.activate found_spec.name, found_spec.version
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.