Permalink
Browse files

[fix #123] receiver object may be changed within NSArray#rindex block

  • Loading branch information...
1 parent b9f969e commit 98e30aaa860432222960aa042cb40bcc7c834116 @Watson1978 Watson1978 committed Jul 5, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 NSArray.m
View
@@ -564,6 +564,11 @@
if (RTEST(test)) {
return LONG2NUM(i);
}
+ const long n = [rcv count];
+ if (n < i) {
+ // Array was modified.
+ i = n;
+ }
}
}
else {

0 comments on commit 98e30aa

Please sign in to comment.