mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
removed "globals" option of CoffeeScript.compile and enhanced fix from
previous commits
This commit is contained in:
@@ -79,7 +79,7 @@
|
||||
global: {}
|
||||
};
|
||||
for (g in global) {
|
||||
sandbox[g] = global[g];
|
||||
sandbox.global[g] = global[g];
|
||||
}
|
||||
sandbox.global.global = sandbox.global;
|
||||
sandbox.global.root = sandbox.global;
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
post = this.compileNode(o);
|
||||
scope = o.scope;
|
||||
if (scope.expressions === this) {
|
||||
if (!o.globals && o.scope.hasDeclarations()) {
|
||||
if (o.scope.hasDeclarations()) {
|
||||
code += "" + this.tab + "var " + (scope.declaredVariables().join(', ')) + ";\n";
|
||||
}
|
||||
if (scope.hasAssignments) {
|
||||
@@ -1304,7 +1304,6 @@
|
||||
o.scope.shared = del(o, 'sharedScope');
|
||||
o.indent += TAB;
|
||||
delete o.bare;
|
||||
delete o.globals;
|
||||
vars = [];
|
||||
exprs = [];
|
||||
_ref2 = this.params;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
global: {}
|
||||
};
|
||||
for (g in global) {
|
||||
sandbox[g] = global[g];
|
||||
sandbox.global[g] = global[g];
|
||||
}
|
||||
sandbox.global.global = sandbox.global;
|
||||
sandbox.global.root = sandbox.global;
|
||||
@@ -41,7 +41,6 @@
|
||||
val = CoffeeScript.eval(code, {
|
||||
sandbox: sandbox,
|
||||
bare: true,
|
||||
globals: true,
|
||||
filename: 'repl'
|
||||
});
|
||||
if (val !== void 0) {
|
||||
|
||||
Reference in New Issue
Block a user