summaryrefslogtreecommitdiff
path: root/lib/httpunix.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/httpunix.rb')
-rw-r--r--lib/httpunix.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/httpunix.rb b/lib/httpunix.rb
index 7d00f71..230db46 100644
--- a/lib/httpunix.rb
+++ b/lib/httpunix.rb
@@ -12,13 +12,14 @@ module URI
def hostname
# decode %XX from path to file
v = host
- URI.decode(v)
+ URI.decode(v) # rubocop:disable Lint/UriEscapeUnescape
end
# port is not allowed in URI
DEFAULT_PORT = nil
- def set_port(v)
- return v unless v
+ def set_port(value)
+ return value unless value
+
raise InvalidURIError, "http+unix:// cannot contain port"
end
end