From: Wakou Aoyama Date: 2002-07-17T03:33:43+09:00 Subject: Re: Pre-RCR... nil.empty? Hello, On Wed, Jul 10, 2002 at 06:02:45AM +0900, Tom Sawyer wrote: > that's the future of cgi? begats! isn't that going to break existing > code? everywhere i put cgi['field'], such that i expect the array, will > have to be changed to cgi.params['field']. is that correct? well, i can > live with that. its seems like the better way, but i'll have work to do! $ ruby -r./cgi.rb -e'value = CGI.new["key"]; p value' key=value "value" $ ruby -r./cgi.rb -e'value, = CGI.new["key"]; p value' key=value "value" cgi['field'] is return String. but, $ ruby -r./cgi.rb -e'value = CGI.new["key"][0]; p value' key=value WARNING! cgi['key'] is return String. if want Array, use cgi['key'].params "value" $ ruby -r./cgi.rb -e'value = CGI.new["key"].first; p value' key=value WARNING! cgi['key'] is return String. if want Array, use cgi['key'].params "value" How about this? Of course, in the future, cgi['field'] is return pure String, and, warning is disappear. -- Wakou Aoyama