* lib/uri/common.rb: [DOC] [Bug #9563] Recommend using URI.escape

before parsing a uri to avoid invalid characters. Reported by
  Evgeniy Serykh.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
zzak 2014-07-27 21:27:10 +00:00
Родитель 015fa2a84f
Коммит 747243cc0e
2 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -1,3 +1,9 @@
Mon Jul 28 06:24:54 2014 Zachary Scott <e@zzak.io>
* lib/uri/common.rb: [DOC] [Bug #9563] Recommend using URI.escape
before parsing a uri to avoid invalid characters. Reported by
Evgeniy Serykh.
Mon Jul 28 05:55:56 2014 Zachary Scott <e@zzak.io> Mon Jul 28 05:55:56 2014 Zachary Scott <e@zzak.io>
* time.c: [DOC] Clarify %Y in strftime, which can accept any digits * time.c: [DOC] Clarify %Y in strftime, which can accept any digits

Просмотреть файл

@ -219,6 +219,9 @@ module URI
# p uri.host # p uri.host
# # => "www.ruby-lang.org" # # => "www.ruby-lang.org"
# #
# It's recommended to first ::escape the provided +uri_str+ if there are any
# invalid URI characters.
#
def self.parse(uri) def self.parse(uri)
RFC3986_PARSER.parse(uri) RFC3986_PARSER.parse(uri)
end end