summaryrefslogtreecommitdiff
path: root/lib/rubygems/compatibility.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-25 03:37:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-25 03:37:54 +0000
commitce59e249a562c8dded6482bc986d72fe34119bff (patch)
treea8551d45afc45278a88eb689d232820d5ddce71f /lib/rubygems/compatibility.rb
parentc10d7640b20f19eae5a9e33751368303bf98a54c (diff)
rubygems: fix variable name
* lib/rubygems/compatibility.rb: fix out-of-scope local variable. * lib/rubygems/specification.rb (Gem::Specification#validate): get rid of conflict between a local variable and a method name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/compatibility.rb')
-rw-r--r--lib/rubygems/compatibility.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/rubygems/compatibility.rb b/lib/rubygems/compatibility.rb
index d06ade1fa6..6a00a199f9 100644
--- a/lib/rubygems/compatibility.rb
+++ b/lib/rubygems/compatibility.rb
@@ -20,8 +20,7 @@ if Gem::GEM_PRELUDE_SUCKAGE and defined?(Gem::QuickLoader) then
$LOADED_FEATURES.delete Gem::QuickLoader.path_to_full_rubygems_library
- if $LOADED_FEATURES.any? do |path| path.end_with? '/rubygems.rb' end then
- # TODO path does not exist here
+ if path = $LOADED_FEATURES.find {|n| n.end_with? '/rubygems.rb'} then
raise LoadError, "another rubygems is already loaded from #{path}"
end