jashkenas/coffee-script — pull request #3054 by BYVoid (2013-06-29 17:04:51+00:00)
Title: Stop modifying require.extensions in the top level.

`require.extensions` should not be modified in the top level. For example, variable `require.extensions` of a script file that loads coffee script by using `var coffee = require('coffee-script')` is modified unexpectedly. `require.extensions` should remains as-is until 'run' is explicitly called.

By implementing this, I created another script file named `compile-helper.coffee` and moved some functions from `coffee-script.coffee` to it. In 'compile-helper.coffee' the new function is named `registerRequire `, which replaced the code in the top level before. `registerRequire ` is called in function `run` of `coffee-script.coffee`.