зеркало из https://github.com/github/ruby.git
* lib/uri/common.rb (URI.encode_www_component):
call str.to_s at first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
732d041dc8
Коммит
7588f09a87
|
@ -1,3 +1,8 @@
|
|||
Mon Mar 15 09:34:17 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* lib/uri/common.rb (URI.encode_www_component):
|
||||
call str.to_s at first.
|
||||
|
||||
Mon Mar 15 09:36:22 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* symbian/README.SYMBIAN: fixed broken patch and converted to
|
||||
|
|
|
@ -743,9 +743,11 @@ module URI
|
|||
end
|
||||
TBLENCWWWCOMP_.freeze
|
||||
end
|
||||
str = str.dup.force_encoding(Encoding::ASCII_8BIT)
|
||||
str = str.to_s.dup
|
||||
enc = str.encoding
|
||||
str.force_encoding(Encoding::ASCII_8BIT)
|
||||
str.gsub!(/[^*\-.0-9A-Z_a-z]/, TBLENCWWWCOMP_)
|
||||
str
|
||||
str.force_encoding(enc)
|
||||
end
|
||||
|
||||
# Decode given +str+ of URL-encoded form data.
|
||||
|
|
Загрузка…
Ссылка в новой задаче