Project

General

Profile

Bug #472 ยป lib_net_http.patch

jg (Junegunn Choi), 08/23/2008 01:50 AM

View differences:

lib/net/http.rb (working copy)
private :encode_kvpair
def urlencode(str)
str.gsub(/[^a-zA-Z0-9_\.\-]/n) { sprintf('%%%02x', $&[0]) }
str.gsub(/[^a-zA-Z0-9_\.\-]/n) { sprintf('%%%02x', $&[0].ord) }
end
private :urlencode
    (1-1/1)