summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-27 17:19:43 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-27 17:19:43 +0000
commit684cdb4f8340f7a88b00bb91139da74b99ec1147 (patch)
treec6256c6812d479a225aa91b893de30ff480ac9b2
parentffb09d8e87f7792e137c1d74fb33ea6cbcb0046c (diff)
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
-rw-r--r--lib/uri/rfc3986_parser.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/uri/rfc3986_parser.rb b/lib/uri/rfc3986_parser.rb
index 8712800..135e847 100644
--- a/lib/uri/rfc3986_parser.rb
+++ b/lib/uri/rfc3986_parser.rb
@@ -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