From: Robert Dober Date: 2007-05-30T20:54:52+09:00 Subject: Re: True arity On 5/30/07, Daniel DeLorme wrote: > Charles Oliver Nutter wrote: > > I guess the question would be whether this is useful enough information > > to warrant a semantic change in "arity" representation. > > It can be useful in some cases and it is *certainly* cleaner than the > wondrous hack that is a negative arity, but I'm never very fond of > backwards compatibility breakage. I'd be more in favor of introducing a > new method (e.g. 'arityrange') that would return a Range object. (please > pretty please mr. core developpers) > > IMHO, Range objects are underused. MatchData#offset would be so much > nicer if it returned (a...b) instead of [a,b] > > just my 2� that is clever Daniel ;) but seriously I just wanted to backup your idea which seems pretty good, what about an RCR? And yes, by all means, use a range, look at this pretty idiom which would result raise ArgumentError unless method.arityrange === n Cheers Robert > > Daniel > > -- You see things; and you say Why? But I dream things that never were; and I say Why not? -- George Bernard Shaw