Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed code that couldn't possibly execute.

  • Loading branch information...
commit f9fcebeb0c5c6e80f86421ac204e157c2cf1ef90 1 parent 7f14836
Bob Aman authored
Showing with 9 additions and 13 deletions.
  1. +9 −13 lib/addressable/uri.rb
22 lib/addressable/uri.rb
View
@@ -999,21 +999,17 @@ def host
# @return [String] The host component, normalized.
def normalized_host
self.host && @normalized_host ||= (begin
- if self.host != nil
- if !self.host.strip.empty?
- result = ::Addressable::IDNA.to_ascii(
- URI.unencode_component(self.host.strip.downcase)
- )
- if result[-1..-1] == "."
- # Trailing dots are unnecessary
- result = result[0...-1]
- end
- result
- else
- EMPTY_STR
+ if !self.host.strip.empty?
+ result = ::Addressable::IDNA.to_ascii(
+ URI.unencode_component(self.host.strip.downcase)
+ )
+ if result[-1..-1] == "."
+ # Trailing dots are unnecessary
+ result = result[0...-1]
end
+ result
else
- nil
+ EMPTY_STR
end
end)
end
Please sign in to comment.
Something went wrong with that request. Please try again.