Every time I have to guess from memory whether to use "contain?" or
"include?" within arrays and strings, I always guess wrong (the right
answer is only "include?" BTW).
Since ruby typically allows multiple ways of doing things, consider this
a feature request to add contain? to both String and Array.
Every time I have to guess from memory whether to use "contain?" or
"include?" within arrays and strings, I always guess wrong (the right
answer is only "include?" BTW).
Since ruby typically allows multiple ways of doing things, consider this
a feature request to add contain? to both String and Array.
You might want to read the thread about the "in" operator on ruby-core.
Something like: e.in? ary
e in ary
give more sense to me than any enum.method? e
Every time I have to guess from memory whether to use "contain?" or
"include?" within arrays and strings, I always guess wrong (the right
answer is only "include?" BTW).
Since ruby typically allows multiple ways of doing things, consider this
a feature request to add contain? to both String and Array.