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.
On Sep 23, 4:32 pm, Roger Pack <rogerpack2...@gmail.com> wrote:
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
···
On 23 September 2010 22:32, Roger Pack <rogerpack2005@gmail.com> wrote:
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.