Permalink
Browse files

Adding a test for #2273

  • Loading branch information...
1 parent afdcdcf commit e433098eb2c3936e14b2e4d9608d4a64aa70545c @jashkenas committed Apr 24, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 test/comprehensions.coffee
@@ -244,6 +244,13 @@ test "Optimized range comprehensions.", ->
exxes = ('x' for [0...10])
ok exxes.join(' ') is 'x x x x x x x x x x'
+
+
+test "Loop variables should be able to reference outer variables", ->
+ outer = 1
+ do ->
+ null for outer in [1, 2, 3]
+ eq outer, 3
test "Lenient on pure statements not trying to reach out of the closure", ->

0 comments on commit e433098

Please sign in to comment.