Merge branch 'master' of github.com:jashkenas/coffee-script
This commit is contained in:
commit
55bf6450e7
4
Cakefile
4
Cakefile
|
@ -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', ->
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue