Use #detect, not #grep

Slight performance gain since detect returns on first match.