From: Brian Candler Date: 2003-07-30T20:07:29+09:00 Subject: Re: API changes in 1.8.0 On Wed, Jul 30, 2003 at 07:10:08PM +0900, ts wrote: > >>>>> "B" == Brian Candler writes: > > >> I admit that having cgi['param'] return one value is more convenient > >> for most scripts, but it would have been nice to announce that change > >> somewhere. Was there a post on this group about it that I missed? > >> It's a major compatibility breaker. > > B> I didn't see anything posted either. > > Thread "Pre-RCR... nil.empty?" > > http://www.ruby-talk.org/43795 > > yes, it's related > > http://www.ruby-talk.org/44044 Ah, both before my time. Having said that, I still don't see how string.empty? is related. It is valid to have "mycgi?foo=&bar=" (empty strings) and it is valid to have foo and bar not present (nil), and they are different conditions. Those conditions would be reported as, respectively, cgi.params['foo'] => [''] cgi.params['foo'] => [] And under the new API I believe you should get cgi['foo'] => '' cgi['foo'] => nil so they are still not the same thing. Regards, Brian.