From: Brian Candler Date: 2004-10-05T00:09:28+09:00 Subject: Re: Too Many Ways? On Mon, Oct 04, 2004 at 11:46:15PM +0900, trans. (T. Onoma) wrote: > > def foo(a,b,c=nil) > > end > > method(:foo).arity # => -3 > > > > def bar(a,b,c=nil,d=nil,e=nil) > > end > > method(:bar).arity # => -3 > > > > It would be a nice use for ranges with infinite bounds, if they existed. > > Exactly what I was thinking. I can't see what's hard about implementing them: have a couple of constant objects for positive and negative infinity (like 'true' and 'false'). Then define -@ method so that -INF == NEGINF, and away you go. I'd be quite happy to have this just for ranges, although I expect everyone would want them to integrate with numbers: 3 * INF == INF and so on. Or can we use the Float 'Infinity' for this? Regards, Brian.