Can anyone explain the purpose of CGI_PARAMS in `cgi.rb'; why the 
constants get defined at all? I cannot find anything that refers to 
them.

They conflict with a reusable environment (i.e. FastCGI).

cgi.rb:

       if defined?(CGI_PARAMS)
         @params  = CGI_PARAMS.nil?  ? nil : CGI_PARAMS.dup
         @cookies = CGI_COOKIES.nil? ? nil : CGI_COOKIES.dup
       else
         initialize_query()  # set @params, @cookies
         eval "CGI_PARAMS  = @params.nil?  ? nil : @params.dup"
         eval "CGI_COOKIES = @cookies.nil? ? nil : @cookies.dup"
         if defined?(MOD_RUBY) and (RUBY_VERSION < "1.4.3")
           raise "Please, use ruby1.4.3 or later."
         else
           at_exit() do
             if defined?(CGI_PARAMS)
               self.class.class_eval("remove_const(:CGI_PARAMS)")
               self.class.class_eval("remove_const(:CGI_COOKIES)")
             end
           end
         end
       end

--
Dan Janowski
danj / 3skel.com