2012/3/31 Bartosz Dziewoski <matma.rex / gmail.com>

> Well, you could also copy the patched URI::Parser#initialize_pattern
> method to all your files that need it. (Just make sure to require
> 'uri' first, and monkeypatch later.) Like this:
>
> require 'uri'
> class URI::Parser
>  def initialize_pattern(opts = {})
>    <snip...>
>  end
> end
>
> There is no other way to do it, without rewriting the entire URI
> library from scratch. (And that would be stupid, even more so since
> the way you want it to work is technically invalid.)
>
> -- Matma Rex
>
>
I feel like there's probably a better way than this, but man this lib
really confuses me.

require 'open-uri'
URI::Parser.new(:HOSTNAME => "(?:[_a-zA-Z0-9\\-.]|%\\h\\h)+").parse("
http://auto_diversen.marktplaza.nl/").open.read