summaryrefslogtreecommitdiff
path: root/lib/httpunix.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-12-13 10:23:17 +0000
committerDouwe Maan <douwe@gitlab.com>2018-12-13 10:23:17 +0000
commit46e81d93ff74a98cf4f02735d310ee4417be0217 (patch)
treec3db905b0890895303b2f1ca91f3ac02664ce48a /lib/httpunix.rb
parent528960c801aed81a977e7ce58a9706b4ea32ab4a (diff)
downloadgitlab-shell-46e81d93ff74a98cf4f02735d310ee4417be0217.tar.gz
Upgrade to Ruby 2.5.3
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