Quickest way is to read the source (available from the 'click to toggle source' link you get when hovering over a method):
def normalize!
if path && path == ''
set_path('/')
end
if scheme && scheme != scheme.downcase
set_scheme(self.scheme.downcase)
end
if host && host != host.downcase
set_host(self.host.downcase)
end
end
looks like the idea is to handle the following oddly-formatted sorts of URIs:
If your goal is to normalize out those ..s in your path, File.expand_path may be more what you're looking for:
File.expand_path('/no/such/path/../srsly') # => returns "/no/such/srsly"
But really, including .. in a URI isn't entirely valid - not all structures exposed via URI are filesystems, after all...
--Matt Jones