diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-27 17:19:43 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-27 17:19:43 +0000 |
commit | 684cdb4f8340f7a88b00bb91139da74b99ec1147 (patch) | |
tree | c6256c6812d479a225aa91b893de30ff480ac9b2 /lib | |
parent | ffb09d8e87f7792e137c1d74fb33ea6cbcb0046c (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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/uri/rfc3986_parser.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/uri/rfc3986_parser.rb b/lib/uri/rfc3986_parser.rb index 871280044a..135e847e88 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 |