From: Robert Klemme Date: 2008-02-16T06:49:58+09:00 Subject: Re: Cute open range? On 15.02.2008 07:34, Clifford Heath wrote: > Joel VanderWerf wrote: >> Does that do anything that Infinity doesn't do? > > Hey, I forgot about Infinity, much better idea, > and you get -Infinity too :-). But this does do > one thing that Infinity doesn't: it works correctly > with Bignums that are too big to be coerced to a > float. I don't think that should concern me though :-). > > Is there a standard place where Infinity is defined, > or should I risk re-defining it? Or worse, test and > define only if needed... Why define or redefine? Why not just irb(main):001:0> N = 1/0.0 => Infinity irb(main):002:0> (1..N) === 2 => true irb(main):003:0> (1..N) === -2 => false etc? I believe this is what Joel wanted to suggest. Kind regards robert