123456789_123456789_123456789_123456789_123456789_

Module: Gem::Requirement::OrderIndependentComparison

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/bundler/rubygems_ext.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#_requirements_sorted?Boolean (readonly, protected)

[ GitHub ]

  
# File 'lib/bundler/rubygems_ext.rb', line 200

def _requirements_sorted?
  return @_are_requirements_sorted if defined?(@_are_requirements_sorted)
  strings = as_list
  @_are_requirements_sorted = strings == strings.sort
end

Instance Method Details

#==(other)

[ GitHub ]

  
# File 'lib/bundler/rubygems_ext.rb', line 188

def ==(other)
  return unless Gem::Requirement === other

  if _requirements_sorted? && other._requirements_sorted?
    super
  else
    _with_sorted_requirements == other._with_sorted_requirements
  end
end

#_with_sorted_requirements (protected)

[ GitHub ]

  
# File 'lib/bundler/rubygems_ext.rb', line 206

def _with_sorted_requirements
  @_with_sorted_requirements ||= _requirements_sorted? ? self : self.class.new(as_list.sort)
end