seattlerb/ruby_parser — pull request #122 by presidentbeef (2013-07-03 06:49:09+00:00)
Title: Fix single assoc after regular args

This only happens with `Ruby20Parser` (or the default `RubyParser`). A method call with a single key-pair as the last (but not only) argument has the key-pair converted into two arguments instead.

```
1.9.3p392 :001 > require 'ruby_parser'
=> true
1.9.3p392 :002 > Ruby20Parser.new.parse "a b, c: 1"
=> s(:call, nil, :a, s(:call, nil, :b), s(:lit, :c), s(:lit, 1))
1.9.3p392 :003 > Ruby20Parser.new.parse "a(b, c => 1)"
=> s(:call, nil, :a, s(:call, nil, :b), s(:call, nil, :c), s(:lit, 1))
1.9.3p392 :004 > Ruby20Parser.new.parse "a(1, 2, c => 3)"
=> s(:call, nil, :a, s(:lit, 1), s(:lit, 2), s(:call, nil, :c), s(:lit, 3))
1.9.3p392 :005 > Ruby20Parser.new.parse "a(b, c, d => true)"
=> s(:call, nil, :a, s(:call, nil, :b), s(:call, nil, :c), s(:call, nil, :d), s(:true))
```

I'm sure this isn't quite the "right" way to fix this, but at least it illustrates the problem (and passes the tests).