Skip to content

Commit

Permalink
Declare i as a local var in #inspectArray
Browse files Browse the repository at this point in the history
This fixes a bug where calling #inspectArray clobbers the main counter and
sends the tests into an infinite loop
  • Loading branch information
sprsquish authored and jcrosby committed Dec 27, 2009
1 parent 660c698 commit 8ad41d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tacular.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ process.mixin(require('sys'));
var inspectArray = function(arr) {
var elements = [];
if(arr.length == 0) return "[]";
for(i = 0; i < arr.length; i++) {
for(var i = 0; i < arr.length; i++) {
elements.push(inspect(arr[i]));
}
return "[" + elements.join(",") + "]";
Expand Down

0 comments on commit 8ad41d8

Please sign in to comment.