mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-11 11:07:07 +00:00
Fix for CPArray and _CPJavaScriptArray -copy
This commit is contained in:
1 parent
03aaa89a61
commit
a000687a42
2 files changed
+7
-2
No files matched your search
@@ -756,7 +756,7 @@ CPBinarySearchingInsertionIndex = 1 << 10;
|
||||
*/
|
||||
- (id)copy
|
||||
{
|
||||
return slice(0);
|
||||
return [[[self class] arrayWithArray:self];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
for (; index < count; ++index)
|
||||
{
|
||||
var object = [anArray objectatIndex:index];
|
||||
var object = [anArray objectAtIndex:index];
|
||||
|
||||
self[index] = object.isa ? [object copy] : object;
|
||||
}
|
||||
@@ -212,6 +212,11 @@
|
||||
self[anIndex] = anObject;
|
||||
}
|
||||
|
||||
- (void)copy
|
||||
{
|
||||
return self.slice(0);
|
||||
}
|
||||
|
||||
- (Class)classForCoder
|
||||
{
|
||||
return CPArray;
|
||||
|
||||
Reference in new issue
Block a user