From: Robert Klemme Date: 2006-08-17T05:45:11+09:00 Subject: Re: string equivalency Brad Tilley wrote: >> b = 'brad' >> >> if 'bradsdhsh' == b >> puts 'equal' >> else >> puts 'not equal' >> end >> >> Or, as a one liner >> >> puts 'bradsdhsh' == b ? 'equal' : 'not equal' > > This is prefered over the String.eql? method? I prefer it and it seems most others, too. Looks better - and note that it's not like in Java where there is a significant difference between == and equals(). Kind regards robert