Skip to content

Commit

Permalink
undo changes from d9d5a22
Browse files Browse the repository at this point in the history
  • Loading branch information
parallaxe committed Jan 7, 2014
1 parent 761c3c3 commit 4ad7f97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/OCMock/OCClassMockObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ + (void)rememberMock:(OCClassMockObject *)mock forClass:(Class)aClass
{
@synchronized(mockTable)
{
[mockTable setObject:[NSValue valueWithNonretainedObject:mock] forKey:NSStringFromClass(aClass)];
[mockTable setObject:[NSValue valueWithNonretainedObject:mock] forKey:[NSValue valueWithNonretainedObject:aClass]];
}
}

+ (void)forgetMockForClass:(Class)aClass
{
@synchronized(mockTable)
{
[mockTable removeObjectForKey:NSStringFromClass(aClass)];
[mockTable removeObjectForKey:[NSValue valueWithNonretainedObject:aClass]];
}
}

Expand All @@ -44,7 +44,7 @@ + (OCClassMockObject *)existingMockForClass:(Class)aClass
OCClassMockObject *mock = nil;
while((mock == nil) && (aClass != nil))
{
mock = [[mockTable objectForKey:NSStringFromClass(aClass)] nonretainedObjectValue];
mock = [[mockTable objectForKey:[NSValue valueWithNonretainedObject:aClass]] nonretainedObjectValue];
aClass = class_getSuperclass(aClass);
}
if(mock == nil)
Expand Down

0 comments on commit 4ad7f97

Please sign in to comment.