From: "Ara.T.Howard" Date: 2005-11-25T05:22:26+09:00 Subject: Re: [BUG] string range membership On Fri, 25 Nov 2005, daz wrote: > > Ara.T.Howard wrote: >> On Thu, 24 Nov 2005, Yukihiro Matsumoto wrote: >> >>> >>> All we need is making up good names for each functionality. >> >> Range#contains? >> >> ?? >> > > > I'm sure there was an earlier post with an excellent > synopsis on ranges which stated that a Range /doesn't/ > "contain"? Yeh, here it is ... from you ;)) > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/167200 > > "not quite - we have a string range that __produces__ > 27 elements. it does not 'have' or 'contain' them. > it merely suggests this set as it's current thought" > > (SCNR ;) > > > Would something like Range#covers? be more apt? > (meaning within the bounds). > Oh, pooh, that's got an 's' on the end as well :( lol. i realized that actually - i thought that the confusion with "include?" being used to test "containment" might be resolved by having a method actually named "contains?". ;-) too confusing? -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 ===============================================================================