ruby-changes:51865
From: tenderlove <ko1@a...>
Date: Sat, 28 Jul 2018 02:19:58 +0900 (JST)
Subject: [ruby-changes:51865] tenderlove:r64079 (trunk): Escape debug output in InvalidURIError exceptions.
tenderlove 2018-07-28 02:19:43 +0900 (Sat, 28 Jul 2018) New Revision: 64079 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64079 Log: Escape debug output in InvalidURIError exceptions. Co-authored-by: Brad Landers <brad@b...> Modified files: trunk/lib/uri/rfc3986_parser.rb Index: lib/uri/rfc3986_parser.rb =================================================================== --- lib/uri/rfc3986_parser.rb (revision 64078) +++ lib/uri/rfc3986_parser.rb (revision 64079) @@ -15,7 +15,7 @@ module URI https://github.com/ruby/ruby/blob/trunk/lib/uri/rfc3986_parser.rb#L15 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 https://github.com/ruby/ruby/blob/trunk/lib/uri/rfc3986_parser.rb#L64 m["fragment".freeze] ] else - raise InvalidURIError, "bad URI(is not URI?): #{uri}" + raise InvalidURIError, "bad URI(is not URI?): #{uri.inspect}" end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/