I got problems with the same chunk of code. My problem was that I was using a form which didn't have a specific value, here's Twitter, for example: When trying to do a URL encode of that field, we'd try to construct a pair but end up with: '(scribe_log) Which would fail at encoding. It should encode to the same as scribe_log having an empty value, that is "scribe_log=" and so should be parsed as '(scribe_log "") - I've attached a patch which fixes that.