summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-28 13:26:01 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-28 13:26:01 +0000
commit1784fd2790487b082d0183d56c365cb40dc40304 (patch)
tree8e41a7a565eda1cb92301b1ca6249d268b97bea9
parent953d425b83579d37a445963aeb3e719bd4e02443 (diff)
* lib/cgi.rb (CGI::initialize): remove at_exit code for CGI_PARAMS
and CGI_COOKIES. they will no longer be used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/cgi.rb31
2 files changed, 10 insertions, 26 deletions
diff --git a/ChangeLog b/ChangeLog
index 26b5d498f1..6d132cede5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jul 28 18:59:17 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * lib/cgi.rb (CGI::initialize): remove at_exit code for CGI_PARAMS
+ and CGI_COOKIES. they will no longer be used.
+
Wed Jul 28 01:04:44 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
* gc.c (run_final): wrong order of data. [ruby-dev:23984]
diff --git a/lib/cgi.rb b/lib/cgi.rb
index 3141d3d692..9e50fb4943 100644
--- a/lib/cgi.rb
+++ b/lib/cgi.rb
@@ -2258,33 +2258,12 @@ class CGI
extend QueryExtension
@multipart = false
- if "POST" != env_table['REQUEST_METHOD']
- initialize_query() # set @params, @cookies
+ if defined?(CGI_PARAMS)
+ warn "do not use CGI_PARAMS and CGI_COOKIES"
+ @params = CGI_PARAMS.dup
+ @cookies = CGI_COOKIES.dup
else
- 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
- params = @params.nil? ? nil : @params.dup
- cookies = @cookies.nil? ? nil : @cookies.dup
- (class << self; self; end).class_eval do
- const_set(:CGI_PARAMS, params)
- const_set(:CGI_COOKIES, cookies)
- end
- 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)
- CGI.class_eval do
- remove_const(:CGI_PARAMS)
- remove_const(:CGI_COOKIES)
- end
- end
- end
- end
- end
+ initialize_query() # set @params, @cookies
end
@output_cookies = nil
@output_hidden = nil