1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/uri/generic.rb (split_userinfo): should split ":pass" into ""

and "pass".  [ruby-dev:25667]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akira 2005-02-23 06:08:29 +00:00
parent de26996f0a
commit c36a0f0ec0
3 changed files with 22 additions and 9 deletions

View file

@ -343,14 +343,7 @@ module URI
def split_userinfo(ui)
return nil, nil unless ui
tmp = ui.index(':')
if tmp
user = ui[0..tmp - 1]
password = ui[tmp + 1..-1]
else
user = ui
password = nil
end
user, password = ui.split(/:/, 2)
return user, password
end