diff options
author | Stan Hu <stanhu@gmail.com> | 2018-12-13 10:23:17 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-12-13 10:23:17 +0000 |
commit | 46e81d93ff74a98cf4f02735d310ee4417be0217 (patch) | |
tree | c3db905b0890895303b2f1ca91f3ac02664ce48a /lib/httpunix.rb | |
parent | 528960c801aed81a977e7ce58a9706b4ea32ab4a (diff) | |
download | gitlab-shell-46e81d93ff74a98cf4f02735d310ee4417be0217.tar.gz |
Upgrade to Ruby 2.5.3
Diffstat (limited to 'lib/httpunix.rb')
-rw-r--r-- | lib/httpunix.rb | 7 |
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 |