lib/bundler/rubygems_ext.rb in bundler-1.13.7 vs lib/bundler/rubygems_ext.rb in bundler-1.14.0.pre.1
- old
+ new
@@ -167,9 +167,14 @@
class Requirement
# Backport of performance enhancement added to Rubygems 1.4
def none?
@none ||= (to_s == ">= 0")
end unless allocate.respond_to?(:none?)
+
+ def exact?
+ return false unless @requirements.size == 1
+ @requirements[0][0] == "="
+ end unless allocate.respond_to?(:exact?)
end
class Platform
JAVA = Gem::Platform.new("java") unless defined?(JAVA)
MSWIN = Gem::Platform.new("mswin32") unless defined?(MSWIN)