Issue #11149 has been updated by nobu (Nobuyoshi Nakada).


At least, that test should not be in `test_parse`, but in `test_set_component` or others.

----------------------------------------
Bug #11149: URI.parse keeps '?' for query and '#' for fragment even if they are empty
https://bugs.ruby-lang.org/issues/11149#change-70960

* Author: davispuh (Dvis Mosns)
* Status: Assigned
* Priority: Normal
* Assignee: naruse (Yui NARUSE)
* Target version: 
* ruby -v: ruby 2.2.1p85 (2015-02-26 revision 49769) [x64-mingw32]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
~~~
p = URI.parse('http://example.com/path?query#fragment')
p.query = ''
p.fragment = ''
puts p.to_s
~~~

will output "http://example.com/path?#" but I think it should be "http://example.com/path" without '?' and '#'




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>