Changeset 8798
- Timestamp:
- 02/03/08 21:08:13 (7 months ago)
- Files:
-
- spinoffs/prototype/trunk/CHANGELOG (modified) (1 diff)
- spinoffs/prototype/trunk/src/enumerable.js (modified) (1 diff)
- spinoffs/prototype/trunk/test/unit/enumerable.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
spinoffs/prototype/trunk/CHANGELOG
r8797 r8798 1 * Prevent Enumerable#eachSlice from entering into an endless loop if passed an argument smaller than 1. Closes #10665. [kangax, Tobie Langel] 2 1 3 * Allow Selector to correctly detect the presence of namespaced attributes. Closes #10987. [Samuel Lebeau, Tobie Langel] 2 4 spinoffs/prototype/trunk/src/enumerable.js
r8149 r8798 18 18 iterator = iterator ? iterator.bind(context) : Prototype.K; 19 19 var index = -number, slices = [], array = this.toArray(); 20 if (number < 1) return array; 20 21 while ((index += number) < array.length) 21 22 slices.push(array.slice(index, index+number)); spinoffs/prototype/trunk/test/unit/enumerable.html
r8572 r8798 165 165 Fixtures.Primes.eachSlice( 3, function(slice){ return slice.reverse() }).flatten() 166 166 ); 167 assertEnumEqual(Fixtures.Basic, Fixtures.Basic.eachSlice(-10)); 168 assertEnumEqual(Fixtures.Basic, Fixtures.Basic.eachSlice(0)); 169 assertNotIdentical(Fixtures.Basic, Fixtures.Basic.eachSlice(0)); 167 170 }}, 168 171