Skip to content

Instantly share code, notes, and snippets.

@davidmfoley
Created March 5, 2013 17:59
Show Gist options
  • Save davidmfoley/5092490 to your computer and use it in GitHub Desktop.
Save davidmfoley/5092490 to your computer and use it in GitHub Desktop.
Coffeescript 1.6.1 bug
class Foo
'bar:baz' : =>
new Foo
// Generated by CoffeeScript 1.6.1
(function() {
var Foo,
_this = this;
Foo = (function() {
function Foo() {
var _this = this;
this['bar:baz'] = function() {
// seems like this should be:
// return Foo.prototype['bar:baz'].apply(_this, arguments);
return Foo.prototype.'bar:baz'.apply(_this, arguments);
};
}
Foo.prototype['bar:baz'] = function() {};
return Foo;
})();
new Foo;
}).call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment