@@ -733,20 +733,37 @@ [new makeImmutable]; return new; } -- (OFArray *)sortedArrayWithOptions: (int)options +- (OFArray *)sortedArrayUsingSelector: (SEL)selector + options: (int)options +{ + OFMutableArray *new = [[self mutableCopy] autorelease]; + + [new sortUsingSelector: selector + options: options]; + + [new makeImmutable]; + + return new; +} + +#ifdef OF_HAVE_BLOCKS +- (OFArray *)sortedArrayUsingComparator: (of_comparator_t)comparator + options: (int)options { OFMutableArray *new = [[self mutableCopy] autorelease]; - [new sortWithOptions: options]; + [new sortUsingComparator: comparator + options: options]; [new makeImmutable]; return new; } +#endif - (OFArray *)reversedArray { OFMutableArray *new = [[self mutableCopy] autorelease];