From: "Ara.T.Howard" Date: 2005-11-24T11:04:59+09:00 Subject: Re: [BUG] string range membership On Thu, 24 Nov 2005, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: [BUG] string range membership" > on Thu, 24 Nov 2005 09:38:11 +0900, "Ara.T.Howard" writes: > > |> All we need is making up good names for each functionality. > | > | Range#contains? > | > |?? > > For which functionality? well, i would think of #member? as most natural for set membership - so #contains? would/should be most like #include? - in my mind. harp:~ > cat a.rb module Enumerable def contains? value map.include? value end end r = "a" .. "aa" p r.contains?("z") harp:~ > ruby a.rb true so, if each would 'hit' it - it's contained. kind regards. -a -- =============================================================================== | ara [dot] t [dot] howard [at] noaa [dot] gov | all happiness comes from the desire for others to be happy. all misery | comes from the desire for oneself to be happy. | -- bodhicaryavatara ===============================================================================