lib/bundler/rubygems_ext.rb in bundler-1.0.10 vs lib/bundler/rubygems_ext.rb in bundler-1.0.11

- old
+ new

@@ -116,24 +116,27 @@ end def to_lock out = " #{name}" unless requirement == Gem::Requirement.default - out << " (#{requirement.to_s})" + reqs = requirement.requirements.map{|o,v| "#{o} #{v}" } + out << " (#{reqs.join(', ')})" end out end + # Backport of performance enhancement added to Rubygems 1.4 def matches_spec?(spec) # name can be a Regexp, so use === return false unless name === spec.name return true if requirement.none? requirement.satisfied_by?(spec.version) end unless allocate.respond_to?(:matches_spec?) end class Requirement + # Backport of performance enhancement added to Rubygems 1.4 def none? @none ||= (to_s == ">= 0") end unless allocate.respond_to?(:none?) end