🕷 zenspider.com

by ryan davis

Looking for the Ruby Quickref?

Bounty: ruby_parser needs 1.9 love

Published 2010-12-09 @ 14:16

Tagged ruby_parser

ruby_parser is only 1.8 compatible and it needs some 1.9 love. I’d like to offer a (negotiable) bounty to get it contributed. Charlie Nutter said he’d also throw in a few bucks.


  • Syntax additions:

    • block arg splat: blah { |a, *b| ... }
    • block arg default values: blah { |a, b=0| ... }
    • splat arg in the middle: def blah(a, *b, c) ... end
    • default arg in the middle: def blah(a, b=0, c) ... end
    • hash delimiters: h = { a: 2 } and blah(a: 2)
    • stabby lambda: p = ->(x) { x.to_f } sigh
    • (am I missing any?)
  • Charlie pointed out:

    • masgn in method args: def foo(a, (b, (c, d), e), f, *g, h) ugh
    • ! and != parse as methods now (probably the worst idea in 1.9)
    • ?a returns single-char string
    • encodings, unicode
  • Every feature must be tested via ParseTree’s pt_testcase.rb setup.


I actually value the tests over the implementation. I would be tempted to get the failing tests passing myself if they were contributed as-is.

For the first pass, I’d be happy if we just did syntax additions and not encoding.