Skip to content

Commit

Permalink
[fix #117] fix the NSArray#values_at when passed the Fixnum value
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 committed Jul 2, 2012
1 parent ec34fa4 commit a6148e0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions NSArray.m
Expand Up @@ -666,6 +666,11 @@
NSMutableArray *result = [NSMutableArray new];
for (long i = 0; i < argc; i++) {
long beg, len;
if (FIXNUM_P(argv[i])) {
id entry = (id)nsary_entry(rcv, FIX2LONG(argv[i]));
[result addObject:RB2OC(entry)];
continue;
}
switch (rb_range_beg_len(argv[i], &beg, &len, rcvlen, 0)) {
// Check if Range.
case Qfalse:
Expand Down

0 comments on commit a6148e0

Please sign in to comment.