From 684cdb4f8340f7a88b00bb91139da74b99ec1147 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Fri, 27 Jul 2018 17:19:43 +0000 Subject: Escape debug output in InvalidURIError exceptions. Co-authored-by: Brad Landers git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/uri/rfc3986_parser.rb | 4 ++-- 1 file 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 -- cgit v1.2.3