From 19dfe4b01d875ad4524d14fda3f45a582e7fa291 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Wed, 22 Sep 2010 22:44:42 -0400 Subject: [PATCH] merging Tim's filename branch. --- lib/coffee-script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/coffee-script.js b/lib/coffee-script.js index 8523aad3..95d31302 100755 --- a/lib/coffee-script.js +++ b/lib/coffee-script.js @@ -45,7 +45,7 @@ if (root.moduleCache) { root.moduleCache = {}; } - return root._compile(exports.compile(code, options), root.filename); + return path.extname(root.filename) !== '.coffee' || require.extensions ? root._compile(exports.compile(code, options), root.filename) : root._compile(code, root.filename); }; exports.eval = function(code, options) { var __dirname, __filename;