Does any of the currently available editors support Ruby's hash colon?

394 views Asked by At

In Ruby 1.9 hash = {:one => 1, :two => 2, :three => 3} is now written as:

hash = {
    one: 1,
    two: 2,
    three: 3
}

However neither the current version of TextMate (1.5.10 (1623)) nor the current version of Redcar (0.10) recognize this as valid syntax, stumbling over the colon and hurting kitties in the process.

Are there any editors that recognize the new hash syntax? (Feel free to praise Vim / Emacs, but please try to include some non-console editors.)

1

There are 1 answers

3
michaelmichael On BEST ANSWER

Are you sure that your TextMate is pointing to Ruby 1.9.x rather than the default system Ruby install? I'm using TextMate with RVM, using 1.9.2 as the default Ruby. TextMate runs the above code just fine.