DEV Community

Discussion on: Understanding Ruby - Enumerable - Predicate Conditions

Collapse
 
thorstenhirsch profile image
Thorsten Hirsch

Hi Brandon, here's a little mistake:

[1, :a, 2].one?(Numeric)
# => true
Enter fullscreen mode Exit fullscreen mode

It returns false, because 2 values are Numeric.

Collapse
 
baweaver profile image
Brandon Weaver

Whoops, forgot to switch that comment to false. Nice catch!