Project

General

Profile

Actions

Bug #11149

closed

URI.parse keeps '?' for query and '#' for fragment even if they are empty

Added by davispuh (Dāvis Mosāns) over 7 years ago. Updated about 4 years ago.

Status:
Rejected
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.2.1p85 (2015-02-26 revision 49769) [x64-mingw32]
[ruby-core:69158]

Description

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 '#'

Actions

Also available in: Atom PDF