On May 14, 2:37=A0pm, Vikrant Chaudhary <nas... / gmail.com> wrote:
> Hi,
> If I do -
>
> ('A'..'Z').include?('AA')
>
> It returns "true", while
>
> ('A'..'Z').to_a.include?('AA')
>
> (of course) returns "false". Is it intentional or possibly a bug?
> I'm using ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux] on
> Ubuntu 10.04 x64

Probably because the way Strings are compared, "AA" < "Z" #=3D> true