class Bundler::URI::Generic
def query=(v)
uri.to_s #=> "http://my.example.com/?id=1"
uri.query = "id=1"
uri = Bundler::URI.parse("http://my.example.com/?id=25")
require 'bundler/vendor/uri/lib/uri'
== Usage
Public setter for the query component +v+.
== Description
String
+v+::
== Args
def query=(v) return @query = nil unless v raise InvalidURIError, "query conflicts with opaque" if @opaque x = v.to_str v = x.dup if x.equal? v v.encode!(Encoding::UTF_8) rescue nil v.delete!("\t\r\n") v.force_encoding(Encoding::ASCII_8BIT) raise InvalidURIError, "invalid percent escape: #{$1}" if /(%\H\H)/n.match(v) v.gsub!(/(?!%\h\h|[!$-&(-;=?-_a-~])./n.freeze){'%%%02X' % $&.ord} v.force_encoding(Encoding::US_ASCII) @query = v end