From: Cyrus Hall Date: 2006-08-03T01:51:49+09:00 Subject: Re: A left-exclusive Range class On Thu, 2006-08-03 at 01:35 +0900, Robert Klemme wrote: > The simplest thing you can always do is to create a method that (and > optionally a special range class if you like) implements this as syntax > modifications are always difficult. If you do > > module Kernel > private > > def lor(r) > r.exclude_end? ? r.first.succ ... r.last : r.first.succ .. r.last > end > end This isn't quite right however, as lor(0...10).include?(0.5) would return false (when it should return true). However, what you suggest is what I'm doing right now, as every DHT I've ever seen uses whole numbers. Never the less, looking for a better solution... I'm writing the unit tests for a little replacement class right now. Once they all pass, I'll post it for others. Cyrus