diff options
Diffstat (limited to 'lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb')
-rw-r--r-- | lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb index 506b447b36..8d73c3f7b5 100644 --- a/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +++ b/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb @@ -19,7 +19,7 @@ module Bundler::PubGrub true end - def eql? + def eql?(other) other.empty? end @@ -65,6 +65,7 @@ module Bundler::PubGrub end EMPTY = Empty.new + Empty.singleton_class.undef_method(:new) def self.empty EMPTY @@ -88,7 +89,8 @@ module Bundler::PubGrub def eql?(other) if other.is_a?(VersionRange) - min.eql?(other.min) && + !other.empty? && + min.eql?(other.min) && max.eql?(other.max) && include_min.eql?(other.include_min) && include_max.eql?(other.include_max) |