From: Robert Dober Date: 2006-09-30T04:51:26+09:00 Subject: Re: String starts? and ends? methods ------=_Part_16314_17828487.1159559483585 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 9/29/06, George wrote: > > Rick DeNatale wrote: > > We wouldn't say > > > > Give me my nine-iron, if does my bag have my nine-iron. In your current form I'd rather use a eight! > > > In situ which of these sounds better to the English speaker? > > > > do_something if a.start_with?('foo') > > do_something if a.respond_to?(:fred) I always found that one troubeling, but I do not consider that a problem, especially in the light that Matz is Japanese as you pointed ou below, we too often forget that. > do_something if a.include?(:joe) > > > > or > > > > do_something if a.starts_with?('foo') > > do_something if a.responds_to?(:fred) > > do_something if a.includes?(:joe) > > This is probably a consequence of Matz being Japanese. We should be > grateful that he used English at > all! > > Amen, and as I said before, after 20 years of Ruby programming I just mastered method_alias, or was it alias_method (long live ri ;). Robert --=20 Deux choses sont infinies : l'univers et la b=EAtise humaine ; en ce qui concerne l'univers, je n'en ai pas acquis la certitude absolue. - Albert Einstein ------=_Part_16314_17828487.1159559483585--