Ruby Enumerable detect and select methods