From: Daniel Finnie Date: 2007-02-21T08:00:52+09:00 Subject: Re: [Facets] Range#overlap? I think your implementation is cleaner however the endpoints of a Range do not have to implement #succ. class Range def span? other include? other.first and (other.exclude_end? ? other.last < last : other.last <= last ) end end I think within? is a better name. Dan Daniel Schierbeck wrote: > On Tue, 2007-02-20 at 22:47 +0900, Daniel Finnie wrote: >> That seems to be what facet/range/within does now. > > It's implementation is rather odd, though. > > Here's what I'd like to have instead: > > class Range > def span? other > include? other.first and > other.last <= (other.exclude_end? ? last.succ : last) > end > end > > > Cheers, > Daniel > > >