From: Stefano Crocco Date: 2008-01-21T03:05:06+09:00 Subject: Re: Newbie Question about Array#include? Alle Sunday 20 January 2008, AoP ha scritto: > Why does the "include?" method of Array end with a question mark? I > thought the question mark was to indicate some sort of "unexpected" > behavior, such as modifying the list, but it doesn't seem to in this > case. > > Thanks - > > -James You're thinking of the exclamation mark (!), which is used for 'dangerous' methods or to distinguish methods which modifies the receiver from the analogous method wich doesn't (for example, Array#uniq! and Array#uniq). The question mark, instead, is used for methods which express a predicate or, in other words, which answer a question (for example, Array#include? answers the question 'does the array contain this item?') Stefano