Merge branch 'master' of github.com:jashkenas/coffee-script

This commit is contained in:
Jeremy Ashkenas 2010-10-24 11:32:29 -04:00
commit 55bf6450e7
3 changed files with 8 additions and 7 deletions

View File

@ -99,8 +99,8 @@ task 'loc', 'count the lines of source code in the CoffeeScript compiler', ->
runTests = (CoffeeScript) ->
startTime = Date.now()
passedTests = failedTests = 0
wrap = (name, func) -> global[name] = -> ++passedTests; func arguments...
wrap name, func for all name, func of require 'assert'
for all name, func of require 'assert' then do (name, func) =>
global[name] = -> ++passedTests; func arguments...
global.eq = global.strictEqual
global.CoffeeScript = CoffeeScript
process.on 'exit', ->

View File

@ -1103,7 +1103,7 @@
this.bound = false;
return new Call(new Value(this, [new Accessor(new Literal('call'))]), [new Literal('this')].concat(this.params));
} else {
return new Call(this, this.params);
return new Call(this);
}
};
return Code;

View File

@ -924,14 +924,15 @@ exports.Code = class Code extends Base
# Short-circuit `traverseChildren` method to prevent it from crossing scope boundaries
# unless `crossScope` is `true`.
traverseChildren: (crossScope, func) -> super(crossScope, func) if crossScope
# Automatically calls the defined function.
do: ->
if @bound
@bound = no
new Call(new Value this, [new Accessor new Literal 'call']
[new Literal 'this'].concat this.params)
else new Call this, this.params
new Call new Value(this, [new Accessor new Literal 'call']),
[new Literal 'this'].concat this.params
else
new Call this
#### Param