Issue #255 has been reported by Anonymous.

----------------------------------------
Bug #255: CGI element generation methods should convert keys/values to Strings before escaping.
http://redmine.ruby-lang.org/issues/show/255

Author: Anonymous
Status: Open
Priority: Normal
Assigned to: 
Category: 
Target version: 


@cgi.file_field("test", 40)
  # => '<INPUT SIZE="40" NAME="test" TYPE="file">'

  @cgi.file_field("NAME" => "test", "SIZE" => 40)
  # => private method `gsub' called for 40:Fixnum

The attached patch fixes this issue for all element generation methods.
Additionally, it allows passing Symbols instead of Strings for attribute names.

  @cgi.file_field("NAME" => "test", "SIZE" => 40)
  # => '<INPUT SIZE="40" NAME="test" TYPE="file">'
  
  @cgi.file_field(:NAME => "test", :SIZE => 40)
  # => '<INPUT SIZE="40" NAME="test" TYPE="file">'


----------------------------------------
http://redmine.ruby-lang.org