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

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top