From: David Alan Black Date: 2002-05-15T00:30:40+09:00 Subject: Re: cgi params api Hi -- On Tue, 14 May 2002, Wakou Aoyama wrote: > test_arg = {"key1" => ["val1", "val2"], "key2"=>["val1", "val2"]} > cgi = CGI.new(test_arg) > p cgi["key1"] # "val1" > p cgi["key1"] == "val1" # true > p cgi["key1"].to_s # "val1" > p cgi["key1"].to_a # ["val1", "val2"] > p cgi["key1"].type # CGI::Param > p cgi["key1"][0] # "val1" backward compatibility ;-> > p cgi["key1"][1] # "val2" > > How about this? Personally I don't like it: it still feels to me like #to_a (on what at least "feels" like a string) is magically interpolating values that weren't there. This makes me question in what sense it is going "to" an array -- or, to put it another way, "to_a" seems like the wrong name for what is happening here. Oh well, even our circles are going in circles :-) I'll shut up unless and until I come up with something tangible. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav