some cleanup, renaming temporary variable from _by to _step

This commit is contained in:
Michael Ficarra
2011-05-06 23:10:46 -04:00
parent d031c26229
commit 56b2b02637
3 changed files with 63 additions and 63 deletions

View File

@@ -408,23 +408,23 @@ test "issue #1124: don't assign a variable in two scopes", ->
listb = (_i + 1 for _i in lista)
arrayEq [2, 3, 4, 5, 6], listb
test "Issue #1326. `by` value is uncached", ->
test "#1326: `by` value is uncached", ->
a = [0,1,2]
fi = gi = hi = 0
f = -> ++fi
g = -> ++gi
h = -> ++hi
forCompile = []
rangeCompileSimple = []
#exercises For.compile
for v,i in a by f() then forCompile.push i
#exercises Range.compileSimple
rangeCompileSimple = (i for i in [0..2] by g())
arrayEq a, forCompile
arrayEq a, rangeCompileSimple
#exercises Range.compile
eq "#{i for i in [0..2] by h()}", '0,1,2'
eq "#{i for i in [0..2] by h()}", '0,1,2'