class Hashie::Extensions::RubyVersion

def <=>(other)

def <=>(other)
  lhsegments = segments
  rhsegments = other.segments
  lhsize = lhsegments.size
  rhsize = rhsegments.size
  limit  = (lhsize > rhsize ? lhsize : rhsize) - 1
  i = 0
  while i <= limit
    lhs = lhsegments[i] || 0
    rhs = rhsegments[i] || 0
    i += 1
    next      if lhs == rhs
    return -1 if lhs.is_a?(String) && rhs.is_a?(Numeric)
    return  1 if lhs.is_a?(Numeric) && rhs.is_a?(String)
    return lhs <=> rhs
  end
  0
end