Skip to content
Browse files

bugfix

  • Loading branch information...
1 parent e21001b commit b5c26322eee7b9a4e3e8a46fdac85d46015a72f5 @maxtaco committed Jan 9, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/coffee-script/nodes.js
  2. +2 −2 src/nodes.coffee
View
4 lib/coffee-script/nodes.js
@@ -2815,7 +2815,7 @@
case "window":
if (v === "window") window_mode = true;
if (window_mode) window_val = new Value(new Literal(v));
- return InlineDeferral.generate(window_val.copy());
+ return InlineDeferral.generate(window_val ? window_val.copy() : null);
case "node":
file = new Literal("'coffee-script'");
access = new Access(new Literal(tame["const"].ns));
@@ -3078,7 +3078,7 @@
a4 = new Assign(this.index, keys_access);
body.unshift(a4);
} else if (this.range && this.name) {
- condition = new Op('<', this.name, this.source.base.to);
+ condition = new Op('<=', this.name, this.source.base.to);
init = [new Assign(this.name, this.source.base.from)];
step = new Op('++', this.name);
} else if (!this.range && this.name) {
View
4 src/nodes.coffee
@@ -2351,7 +2351,7 @@ exports.TameRequire = class TameRequire extends Base
window_mode = true if v is "window"
if window_mode
window_val = new Value new Literal v
- InlineDeferral.generate(window_val.copy())
+ InlineDeferral.generate(if window_val then window_val.copy() else null)
when "node"
file = new Literal "'coffee-script'"
access = new Access new Literal tame.const.ns
@@ -2580,7 +2580,7 @@ exports.For = class For extends While
# Handle the case of 'for i in [0..10]'
else if @range and @name
- condition = new Op '<', @name, @source.base.to
+ condition = new Op '<=', @name, @source.base.to
init = [ new Assign @name, @source.base.from ]
step = new Op '++', @name

0 comments on commit b5c2632

Please sign in to comment.
Something went wrong with that request. Please try again.