From: Simon Strandgaard Date: 2005-07-19T23:29:50+09:00 Subject: Re: [RCR] nil for unassigned keys On 7/19/05, Ara.T.Howard wrote: > On Tue, 19 Jul 2005, Simon Strandgaard wrote: [snip] > > Maybe I don't understand the mandatory argument thing? > > But can't you just count them somehow? > > not when there are zero or more allowed, for instance > def test(*args, &block) Ok.. yeah thats an issue. [snip] > why not a little helper function to transform argument lists in the way you > desire? [snip] > which at least allows > test(h('x', 'z', 'y' => 42)) [snip] pretty neat.. the reason I began thinking these thoughts was one of the other threads where String#to_a taking a hash was discussed. "aoeu".to_a(:bytes=>true) it could be a little nicer with "aoeu".to_a(:bytes) -- Simon Strandgaard