From: "charliesome (Charlie Somerville)" Date: 2013-04-17T20:38:11+09:00 Subject: [ruby-core:54384] [ruby-trunk - Bug #8103] Fix for URI.decode_www_form ArgumentError Issue #8103 has been updated by charliesome (Charlie Somerville). Assignee set to akira (akira yamada) ---------------------------------------- Bug #8103: Fix for URI.decode_www_form ArgumentError https://bugs.ruby-lang.org/issues/8103#change-38652 Author: misfo (Trent Ogren) Status: Open Priority: Normal Assignee: akira (akira yamada) Category: lib Target version: ruby -v: ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.1] URI.decode_www_form pukes out an ArgumentError if passed any parameter names that aren't followed by an equals sign. Because of this it can't decode some of the strings that were encoded with URI.encode_www_form: irb> require 'uri' => true irb> querystring = URI.encode_www_form 'a' => '1', 'b' => nil => "a=1&b" irb> URI.decode_www_form querystring ArgumentError: invalid data of application/x-www-form-urlencoded (a=1&b) from /Users/misfo/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/uri/common.rb:975:in `decode_www_form' from (irb):3 from /Users/misfo/.rbenv/versions/2.0.0-p0/bin/irb:12:in `
' I've attached a patch -- http://bugs.ruby-lang.org/