From: Ben Giddings Date: 2003-11-12T01:16:24+09:00 Subject: Re: ruby-dev summary 21833-21882 Kazuo Saito wrote: > [ruby-dev:21819] error message of Array.new(9,0) {|x|x+1} > > Take_tk reported a strange error message from Array.new: > > Array.new(9,0){|x|x+1} > #=> wrong number of arguments (ArgumentError) > > The Array.new takes only 4 styles of arguments, an another array, > size of array, size and a default value, or size and a block to > generate default values. The example above mixes 2 argument > styles at once, but the error message is a little bit difficult > to understand. > > Proper English message for this error is wanted. Fell free to > post your idea. Hrm, well you could try "too many arguments", or be more specific and say "default value must either be block or value, not both". Ben