lib/url_canonicalize/uri.rb in url_canonicalize-0.1.10 vs lib/url_canonicalize/uri.rb in url_canonicalize-0.1.11
- old
+ new
@@ -2,11 +2,10 @@
module URLCanonicalize
# Manage the URL into a URI with local exception handling
class URI
class << self
def parse(url)
- # uri = ::URI.parse decorate(url)
- uri = ::URI.parse url
+ uri = ::URI.parse decorate(url)
uri if valid? uri
rescue ::URI::InvalidURIError => e
new_exception = URLCanonicalize::Exception::URI.new("#{e.class}: #{e.message}")
new_exception.set_backtrace e.backtrace
raise new_exception