seattlerb/ruby_parser — pull request #27 by brynary (2011-11-01 03:47:38+00:00)
Title: Add tLABEL

This fixes issues with Ruby 1.9 hashes with no spaces after the colon:

foo(a:1)

Two important notes:

* This adds a 1.9 specific lexer modification. The lexer should be split for 1.8 vs. 1.9
* This fix _breaks_ behavior for calling a method with a symbol with no space and no parens:

def foo(*args)
puts args.inspect
end

foo:bar # prints [:bar]

This needs to be fixed, but in my research the Ruby 1.9 hash with no space is much more common than the above case, so this is a net win.