lib/io_streams/utils.rb in iostreams-1.2.1 vs lib/io_streams/utils.rb in iostreams-1.3.0

- old
+ new

@@ -47,13 +47,13 @@ @hostname = uri.hostname @path = CGI.unescape(uri.path) @user = uri.user @password = uri.password @port = uri.port - if uri.query - @query = {} - ::URI.decode_www_form(uri.query).each { |key, value| @query[key] = value } - end + return unless uri.query + + @query = {} + ::URI.decode_www_form(uri.query).each { |key, value| @query[key] = value } end end end end