([NSArray +arrayWithObject:]): Correctly raise exception on nil argument.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@629 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1995-10-22 17:53:38 +00:00
parent df6440235d
commit 7c98affe14

View file

@ -127,6 +127,8 @@ static Class NSMutableArray_concrete_class;
+ arrayWithObject: anObject
{
[NSException raise:NSInvalidArgumentException
format:@"Tried to add nil"];
return [[[[self _concreteClass] alloc] initWithObjects:&anObject count:1]
autorelease];
}