Wakou Aoyama <wakou / fsinet.or.jp> wrote in message news:<20020515153444.GA14352%wakou / fsinet.or.jp>...
> Hi,
> 
> I like, values is an Array object. because,
> value, value, value, ...  : It's Array.
> value                     : if only one value ... still Array.
> 
> 
> I wish, please use cgi.params.
> 
>   cgi.params["key"].each{|value| foo(value) }
> 
> This code is clear. because, cgi.params return Hash object.
> and, values is an Array object, and CGI object is *not* Hash object.
> 
> 
> On Wed, May 15, 2002 at 05:22:00AM +0900,
>  Yukihiro Matsumoto wrote:
> 
> > For 99.8% of the cases, we get single value for a prarameter.
> 
> yes, it is very important.
> 
> cgi.params["key"] is used a lot. and, It's a little long.
> therefore, cgi["key"] interface was prepared.
> 
> ...
> 
> I think cgi["key"] return a String object is good.
> 
>   cgi.params["key"].each{|value| foo(value) }
> 
> or, if it is clear that values has only one value,
> 
>   foo(cgi["key"])

This makes the most sense.  It solves the problem from my initial
suggestion, while minimizing the changes to how cgi.rb works.

~ Patrick