summaryrefslogtreecommitdiff
path: root/lib/httpunix.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-12-13 11:36:09 +0000
committerDouwe Maan <douwe@gitlab.com>2018-12-13 11:36:09 +0000
commit47dc17bce2e59b403dffa9eacc8b146618dba2c2 (patch)
tree544fda407b7df029b0dd122f949fd0dfe3ad9694 /lib/httpunix.rb
parentdf89099ed954a6673bb8388ef74480940d40a759 (diff)
downloadgitlab-shell-47dc17bce2e59b403dffa9eacc8b146618dba2c2.tar.gz
Revert "Merge branch 'sh-bump-ruby-version' into 'master'"
This reverts merge request !257
Diffstat (limited to 'lib/httpunix.rb')
-rw-r--r--lib/httpunix.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/httpunix.rb b/lib/httpunix.rb
index 230db46..7d00f71 100644
--- a/lib/httpunix.rb
+++ b/lib/httpunix.rb
@@ -12,14 +12,13 @@ module URI
def hostname
# decode %XX from path to file
v = host
- URI.decode(v) # rubocop:disable Lint/UriEscapeUnescape
+ URI.decode(v)
end
# port is not allowed in URI
DEFAULT_PORT = nil
- def set_port(value)
- return value unless value
-
+ def set_port(v)
+ return v unless v
raise InvalidURIError, "http+unix:// cannot contain port"
end
end