lib/bundler/source/rubygems.rb in bundler-1.10.4 vs lib/bundler/source/rubygems.rb in bundler-1.10.5
- old
+ new
@@ -96,11 +96,11 @@
else
spec.loaded_from = loaded_from(spec)
end
end
- if installed_specs[spec].any? && !force
+ if installed?(spec) && (!force || spec.name.eql?("bundler"))
Bundler.ui.info "Using #{version_message(spec)}"
return nil # no post-install message
end
# Download the gem to get the spec, because some specs that are returned
@@ -409,9 +409,13 @@
# Ruby 2.1, where all included gems have this summary
return true if spec.summary =~ /is bundled with Ruby/
# Ruby 2.0, where gemspecs are stored in specifications/default/
spec.loaded_from && spec.loaded_from.include?("specifications/default/")
+ end
+
+ def installed?(spec)
+ installed_specs[spec].any?
end
end
end
end