문제

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