Actions
Bug #14793
closedHash returned from CGI.parse has [] as default value
Description
Is there a valid reason for this behaviour? It looks like a bug to me:
require 'cgi'
params = CGI.parse("")
params["x"]
#=> []
(Expected nil)
I looked at history and it looks like it has been there from the very beginning of cgi.rb.
Updated by avit (Andrew Vit) over 6 years ago
My mistake, it looks like all CGI values are always returned as arrays:
CGI.parse("x=y")
#=> {"x"=>["y"]}
Please close.
Updated by naruse (Yui NARUSE) over 6 years ago
- Status changed from Open to Closed
Actions
Like0
Like0Like0Like0