summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rubygems/compatibility.rb3
-rw-r--r--lib/rubygems/specification.rb4
2 files changed, 3 insertions, 4 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
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index 8ccaa962b8..ab1cd92270 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -2456,8 +2456,8 @@ class Gem::Specification < Gem::BasicSpecification
extend Gem::UserInteraction
normalize
- nil_attributes = self.class.non_nil_attributes.find_all do |name|
- instance_variable_get("@#{name}").nil?
+ nil_attributes = self.class.non_nil_attributes.find_all do |attrname|
+ instance_variable_get("@#{attrname}").nil?
end
unless nil_attributes.empty? then