In iris recognition systems, it is essential to accurately locate the pupil and the iris. Among segmentation algorithms for systems utilizing near-infrared light, some make the assumption that the pupil is darker than the rest of the image. For this class of algorithms, the red eye effect, which makes the pupil region brighter than the iris, could damage their performance. Other segmentation algorithms use edge information to fit circles, yet noisy images make them inaccurate. Therefore, it is desirable to use different segmentation algorithms for images with and without the red eye effect. In this paper, we introduce a novel method which distinguishes iris images exhibiting the red eye effect from those with a dark pupil. Our detector starts with a 2D darkness map of the iris image, and generates a customized shape context descriptor from the estimated pupil region. The descriptor is then compared with the reference descriptor, generated from a number of training images with dark pupils. The distance to the reference descriptor is used to define how close the estimated pupil region is from a dark pupil. Tests with images captured with our own acquisition system shows the proposed pupil detector is highly effective.