Skip to content

Commit

Permalink
Add space after bad URI
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref authored and hsbt committed Jun 11, 2024
1 parent ab8ee6f commit 9f2c7ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/uri/rfc2396_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ def split(uri)

if !scheme
raise InvalidURIError,
"bad URI(absolute but no scheme): #{uri}"
"bad URI (absolute but no scheme): #{uri}"
end
if !opaque && (!path && (!host && !registry))
raise InvalidURIError,
"bad URI(absolute but no path): #{uri}"
"bad URI (absolute but no path): #{uri}"
end

when @regexp[:REL_URI]
Expand Down Expand Up @@ -173,7 +173,7 @@ def split(uri)
# server = [ [ userinfo "@" ] hostport ]

else
raise InvalidURIError, "bad URI(is not URI?): #{uri}"
raise InvalidURIError, "bad URI (is not URI?): #{uri}"
end

path = '' if !path && !opaque # (see RFC2396 Section 5.2)
Expand Down
4 changes: 2 additions & 2 deletions lib/uri/rfc3986_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def split(uri) #:nodoc:
begin
uri = uri.to_str
rescue NoMethodError
raise InvalidURIError, "bad URI(is not URI?): #{uri.inspect}"
raise InvalidURIError, "bad URI (is not URI?): #{uri.inspect}"
end
uri.ascii_only? or
raise InvalidURIError, "URI must be ascii only #{uri.dump}"
Expand Down Expand Up @@ -127,7 +127,7 @@ def split(uri) #:nodoc:
m["fragment"]
]
else
raise InvalidURIError, "bad URI(is not URI?): #{uri.inspect}"
raise InvalidURIError, "bad URI (is not URI?): #{uri.inspect}"
end
end

Expand Down

0 comments on commit 9f2c7ed

Please sign in to comment.