Question

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.)

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top