1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Escape debug output in InvalidURIError exceptions.

Co-authored-by: Brad Landers <brad@bradlanders.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tenderlove 2018-07-27 17:19:43 +00:00
parent ffb09d8e87
commit 684cdb4f83

View file

@ -15,7 +15,7 @@ module URI
begin
uri = uri.to_str
rescue NoMethodError
raise InvalidURIError, "bad URI(is not URI?): #{uri}"
raise InvalidURIError, "bad URI(is not URI?): #{uri.inspect}"
end
uri.ascii_only? or
raise InvalidURIError, "URI must be ascii only #{uri.dump}"
@ -64,7 +64,7 @@ module URI
m["fragment".freeze]
]
else
raise InvalidURIError, "bad URI(is not URI?): #{uri}"
raise InvalidURIError, "bad URI(is not URI?): #{uri.inspect}"
end
end