From: Junegunn Choi Date: 2008-08-23T01:46:33+09:00 Subject: [ruby-core:18368] [Bug #472] No ord in Net::HTTP#urlencode Bug #472: No ord in Net::HTTP#urlencode http://redmine.ruby-lang.org/issues/show/472 Author: Junegunn Choi Status: Open, Priority: Normal 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. ---------------------------------------- http://redmine.ruby-lang.org