# File lib/more/facets/version.rb, line 118
  def self.parse_constraint( constraint )
    constraint = constraint.strip
    re = %r{^(=~|~>|<=|>=|==|=|<|>)?\s*(\d+(:?[-.]\d+)*)$}
    if md = re.match( constraint )
      if op = md[1]
        op = '=~' if op == '~>'
        op = '==' if op == '='
        val = new( *md[2].split(/\W+/) )
      else
        op = '=='
        val = new( *constraint.split(/\W+/) )
      end
    else
      raise ArgumentError, "invalid constraint"
    end
    return op, val
  end