Permalink
Browse files

Merge pull request #144 from agamatrix/master

Threaded use can cause exception to be thrown while matching
  • Loading branch information...
2 parents 147cff8 + 6804d15 commit 0694033bc6b2c105cc0524527a52d94c4b7fa46d @jonreid committed on GitHub Mar 23, 2017
Showing with 1 addition and 1 deletion.
  1. +1 −1 Source/OCMockito/Stubbing/MKTInvocationContainer.m
@@ -59,7 +59,7 @@ - (void)addAnswer:(id <MKTAnswer>)answer
- (MKTStubbedInvocationMatcher *)findAnswerFor:(NSInvocation *)invocation
{
- for (MKTStubbedInvocationMatcher *s in self.stubbed)
+ for (MKTStubbedInvocationMatcher *s in [self.stubbed copy])
if ([s matches:invocation])
return s;
return nil;

0 comments on commit 0694033

Please sign in to comment.