set_fields (WWW::Mechanize::Form)

    # File lib/www/mechanize/form.rb, line 77
          def set_fields(fields = {})
            fields.each do |k,v|
              case v
              when Hash
                v.each do |index, value|
                  self.fields_with(:name => k.to_s).[](index).value = value
                end
              else
                value = nil
                index = 0
                [v].flatten.each do |val|
                  index = val.to_i unless value.nil?
                  value = val if value.nil?
                end
                self.fields_with(:name => k.to_s).[](index).value = value
              end
            end
          end