On Ruby 2.2.0dev URI.parse
has been changed so that it uses RFC3986. This changes the semantics of URIs in some subtle ways. Probably most importantly it means that square brackets "[", "]" and a few other characters should be percent-encoded, primarily in the query string.
Unfortunately the implementation on ruby-trunk doesn't provide an encoding functionality. I raised a bug explaining this: https://bugs.ruby-lang.org/issues/9990 but here's a quick script to demonstrate the issue:
url = "https://bugs.ruby-lang.org/projects/ruby-trunk/issues?set_filter=1&f[]=status_id&op[status_id]=o"
puts URI.encode(url)
URI.parse(URI.encode(url))