Changeset 5294
- Timestamp:
- 10/13/06 12:39:09 (3 years ago)
- Files:
-
- spinoffs/prototype/CHANGELOG (modified) (1 diff)
- spinoffs/prototype/src/array.js (modified) (1 diff)
- spinoffs/prototype/test/unit/array.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
spinoffs/prototype/CHANGELOG
r5271 r5294 1 1 *SVN* 2 3 * Add clone() method to arrays, fixes #6338 [Tobie Langel] 2 4 3 5 * Backing out of [5194] (Element.clear) because of issues with IE on certain elements, #6051 spinoffs/prototype/src/array.js
r4986 r5294 75 75 }, 76 76 77 clone: function() { 78 return [].concat(this); 79 }, 80 77 81 inspect: function() { 78 82 return '[' + this.map(Object.inspect).join(', ') + ']'; spinoffs/prototype/test/unit/array.html
r5137 r5294 34 34 assertEnumEqual([], [1].clear()); 35 35 assertEnumEqual([], [1,2].clear()); 36 }}, 37 38 testClone: function(){ with(this) { 39 assertEnumEqual([], [].clone()); 40 assertEnumEqual([1], [1].clone()); 41 assertEnumEqual([1,2], [1,2].clone()); 42 assertEnumEqual([0,1,2], [0,1,2].clone()); 43 var a = [0,1,2]; 44 var b = a; 45 assertIdentical(a, b); 46 b = a.clone(); 47 assertNotIdentical(a, b); 36 48 }}, 37 49