To be clear, {(eval(foo)): "bar"} is invalid JavaScript; the object literal syntax only allows literal strings as keys. To support dynamic keys, CoffeeScript would have to convert that code to something like __obj = {}; __obj[eval(foo)] = "bar";.
–
Trevor BurnhamOct 8 '11 at 21:03

CoffeeScript, like JavaScript, does not let you use expressions/variables as keys in object literals. This was support briefly, but was removed in version 0.9.6. You need to set the property after creating the object.

If you're looking to use Coffeescript's minimal syntax for defining your associative array, I suggest creating a simple two line method to convert the variable name keys into the variable values after you've defined the array.