Project

General

Profile

Actions

Bug #472

closed

No ord in Net::HTTP#urlencode

Added by jg (Junegunn Choi) over 14 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
Backport:
[ruby-core:18368]

Description

=begin
def urlencode(str)
str.gsub(/[^a-zA-Z0-9_\.\-]/n) { sprintf('%%%02x', $&[0]) }
end

Since the semantics of String#[] has changed in 1.9, we need to call ord method.
Patch attached.
=end


Files

lib_net_http.patch (412 Bytes) lib_net_http.patch jg (Junegunn Choi), 08/23/2008 01:50 AM
Actions

Also available in: Atom PDF

Like0
Like0