Skip to content
Permalink
Browse files

Merge branch 'bug_4366' of https://github.com/jboesch/jquery into jbo…

…esch-bug_4366
  • Loading branch information
jeresig committed Apr 12, 2011
2 parents 2d27ac4 + 926884b commit 31b3c44db3b26274b1ad0efd46952ecc2a9380cc
Showing with 13 additions and 3 deletions.
  1. +5 −2 src/core.js
  2. +8 −1 test/unit/core.js
@@ -613,8 +613,11 @@ jQuery.extend({
}
}
} else {
for ( var value = object[0];
i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {}
for ( ; i < length; ) {
if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
break;
}
}
}
}

@@ -818,7 +818,7 @@ test("jQuery.extend(Object, Object)", function() {
});

test("jQuery.each(Object,Function)", function() {
expect(13);
expect(14);
jQuery.each( [0,1,2], function(i, n){
equals( i, n, "Check array iteration" );
});
@@ -850,6 +850,13 @@ test("jQuery.each(Object,Function)", function() {
f[i] = 'baz';
});
equals( "baz", f.foo, "Loop over a function" );

var stylesheet_count = 0;
jQuery.each(document.styleSheets, function(i){
stylesheet_count++;
});
equals(stylesheet_count, 2, "should not throw an error in IE while looping over document.styleSheets and return proper amount");

});

test("jQuery.makeArray", function(){

0 comments on commit 31b3c44

Please sign in to comment.
You can’t perform that action at this time.