tenderlove/mechanize — Issue #186: comparison of Mechanize::Form::SelectList with Mechanize::Form::Submit failed
Author: cthiel
Created: 2012-01-08 22:09:30+00:00
State: open

I'm getting **ArgumentError: comparison of Mechanize::Form::SelectList with Mechanize::Form::Submit failed** on mechanize 2.1 on Ruby 1.8.7.p352.

```
ArgumentError: comparison of Mechanize::Form::SelectList with Mechanize::Form::Submit failed
from /usr/lib64/ruby/gems/1.8/gems/mechanize-2.1/lib/mechanize/form.rb:250:in `sort'
from /usr/lib64/ruby/gems/1.8/gems/mechanize-2.1/lib/mechanize/form.rb:250:in `build_query'
from /usr/lib64/ruby/gems/1.8/gems/mechanize-2.1/lib/mechanize/form.rb:268:in `request_data'
from /usr/lib64/ruby/gems/1.8/gems/mechanize-2.1/lib/mechanize.rb:1026:in `post_form'
from /usr/lib64/ruby/gems/1.8/gems/mechanize-2.1/lib/mechanize.rb:426:in `submit'
from /usr/lib64/ruby/gems/1.8/gems/mechanize-2.1/lib/mechanize/form.rb:178:in `submit'
from /usr/lib64/ruby/gems/1.8/gems/mechanize-2.1/lib/mechanize/form.rb:184:in `click_button'
```

Removing the "sort" part in line 247 in form.rb works around this issue: https://github.com/tenderlove/mechanize/blob/master/lib/mechanize/form.rb#L247