Updated CPObject's instancesRespondToSelector to return BOOL

This commit is contained in:
Ross Boucher committed 2009-03-05 14:30:38 -08:00
1 parent 0508c54799
commit 46a975b966
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -674,7 +674,7 @@
*/
- (CPArray)arrayByAddingObject:(id)anObject
{
if (!anObject)
if (anObject === nil || anObject === undefined)
[CPException raise:CPInvalidArgumentException
reason:"arrayByAddingObject: object can't be nil"];
+2 -2
View File
@@ -177,7 +177,7 @@
*/
+ (BOOL)instancesRespondToSelector:(SEL)aSelector
{
return class_getInstanceMethod(self, aSelector);
return !!class_getInstanceMethod(self, aSelector);
}
/*!
@@ -187,7 +187,7 @@
*/
- (BOOL)respondsToSelector:(SEL)aSelector
{
return class_getInstanceMethod(isa, aSelector) != NULL;
return !!class_getInstanceMethod(isa, aSelector);
}
// Obtaining method information