    # File lib/facets/more/cookie.rb, line 238
        def parse(str, url)
          @url = url
          cookie_elem = str.split(/;/)
          cookie_elem = join_quotedstr(cookie_elem, ';')
          first_elem = cookie_elem.shift
          if first_elem !~ /([^=]*)(\=(.*))?/
            return
            ## raise ArgumentError 'invalid cookie value'
          end
          @name = $1.strip
          @value = $3
          if @value
            if @value =~ /^\s*"(.*)"\s*$/
              @value = $1
            else
              @value.dup.strip!
            end
          end
          cookie_elem.each{|pair|
            key, value = pair.split(/=/)  ## value may nil
            key.strip!
            if value
              value = value.strip.sub(/\A"(.*)"\z/) { $1 }
            end
            case key.downcase
            when 'domain'
              @domain = value
            when 'expires'
              begin
                @expires = Time.gm(*parsedate(value)[0,6])
              rescue ArgumentError
                @expires = nil
              end
            when 'path'
              @path = value
            when 'secure'
              @secure = true  ## value may nil, but must 'true'.
            else
              ## ignore
            end
          }
        end