From: Brian Candler Date: 2003-07-30T16:31:11+09:00 Subject: Re: API changes in 1.8.0 On Wed, Jul 30, 2003 at 11:07:03AM +0900, Mark J. Reed wrote: > On Sun, Jul 27, 2003 at 07:26:18PM +0900, Brian Candler wrote: > > Has anyone written a summary of API changes between 1.6.8 and 1.8.0? If not, > > I think that would be a *really* helpful idea. > > > > I have just discovered that the [] method of CGI has changed: > > I also made this discovery, when I upgraded mod_ruby to 1.8 and thereby > broke my entire website. Parts of which stayed down for two weeks > because I'd missed them in my fix pass. :\ Maybe things have changed since you did that, because it's pretty clever about it now: cgi['param'] returns an object which is a subclass of String, and it has [], first and last methods. If you call any of those methods it just returns the object itself and generates a warning. Of course, if you *need* to accept multiple values for a particular form attribute then it will break; but existing scripts which say cgi['param'][0] do actually work. > 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. I didn't see anything posted either. Regards, Brian.