Permalink
Browse files

Sigh, thinking backports was a bad idea

  • Loading branch information...
1 parent 4eab650 commit 86763dc2b771040a1e2975795d2407a946ee6afe @raggi raggi committed with rkh May 26, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rack/backports/uri/common.rb
@@ -22,7 +22,7 @@ module URI
def self.encode_www_form_component(str)
if RUBY_VERSION < "1.9" && $KCODE =~ /u/i
str.gsub(/([^ a-zA-Z0-9_.-]+)/) do
- '%' + $1.unpack('H2' * $1.bytesize).join('%').upcase
+ '%' + $1.unpack('H2' * Rack::Utils.bytesize($1)).join('%').upcase
end.tr(' ', '+')
else
if TBLENCWWWCOMP_.empty?

0 comments on commit 86763dc

Please sign in to comment.