Or you could say '$= = true'
Deprecated and evil, but possible.
Regards,
Dan
···
-----Original Message-----
From: ChrisH [mailto:chris.hulan@gmail.com]
Sent: Tuesday, March 21, 2006 12:59 PM
To: ruby-talk ML
Subject: Re: "str1" == "STR1" case insensitivePeter Ertl wrote:
> class String
> def eq(arg)
> self.casecmp(arg ) == 0
> end
> end
>Or you could say:
class String
alias eq casecmp
end> puts "Test".eq("test")
> > true