summaryrefslogtreecommitdiff
path: root/lib/cgi.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-12-01 09:24:48 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-12-01 09:24:48 +0000
commita3f29338ad53c1027eeef0d3c7168d3355105d20 (patch)
treebcccfeb74a7a975d713727a964e89fd53cc80e05 /lib/cgi.rb
parent40517ecac82e4b406227bd30fd89d05c2e90bc87 (diff)
19991201
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/cgi.rb')
-rw-r--r--lib/cgi.rb36
1 files changed, 31 insertions, 5 deletions
diff --git a/lib/cgi.rb b/lib/cgi.rb
index fa98fec..96f5533 100644
--- a/lib/cgi.rb
+++ b/lib/cgi.rb
@@ -5,7 +5,7 @@ $Date$
CGI.rb
-Version 1.00
+Version 1.01
Copyright (C) 1999 Network Applied Communication Laboratory, Inc.
@@ -182,7 +182,7 @@ class CGI
EOL = CR + LF
v = $-v
$-v = false
- VERSION = "1.00"
+ VERSION = "1.01"
RELEASE_DATE = "$Date$"
$-v = v
@@ -958,6 +958,7 @@ convert string charset, and set language to "ja".
# - -
def nn_element_def(element)
<<-END.gsub(/element\.downcase/n, element.downcase).gsub(/element\.upcase/n, element.upcase)
+ attributes.delete_if{|k,v| v == nil }
"<element.upcase" + attributes.collect{|name, value|
" " + CGI::escapeHTML(name) +
if true == value
@@ -978,6 +979,7 @@ convert string charset, and set language to "ja".
# - O EMPTY
def nOE_element_def(element)
<<-END.gsub(/element\.downcase/n, element.downcase).gsub(/element\.upcase/n, element.upcase)
+ attributes.delete_if{|k,v| v == nil }
"<element.upcase" + attributes.collect{|name, value|
" " + CGI::escapeHTML(name) +
if true == value
@@ -992,7 +994,8 @@ convert string charset, and set language to "ja".
# O O or - O
def nO_element_def(element)
<<-END.gsub(/element\.downcase/n, element.downcase).gsub(/element\.upcase/n, element.upcase)
- "<element.upcase" + attributes.collect{|name, value|
+ attributes.delete_if{|k,v| v == nil }
+ "<element.upcase" + attributes.collect{|name, value|
" " + CGI::escapeHTML(name) +
if true == value
""
@@ -1834,9 +1837,26 @@ convert string charset, and set language to "ja".
def initialize(type = "query")
+ @params = nil
+ @cookies = nil
+ @output_cookies = nil
+ @output_hidden = nil
+
extend QueryExtension
- initialize_query()
- # @params, @cookies initialized in initialize_query
+
+ #if defined? CGI::PARAMS
+ # @params = "C" + (CGI::PARAMS.nil? ? nil : CGI::PARAMS.dup).inspect
+ # @cookies = "C" + (CGI::COOKIES.nil? ? nil : CGI::COOKIES.dup).inspect
+ #else
+ initialize_query()
+ # @params, @cookies initialized in initialize_query
+ # eval "PARAMS = @params.nil? ? nil : @params.dup"
+ # eval "COOKIES = @cookies.nil? ? nil : @cookies.dup"
+ # at_exit {
+ # remove_const(PARAMS)
+ # remove_const(COOKIES)
+ # }
+ #end
case type
when "html3"
@@ -1860,6 +1880,12 @@ end
== HISTRY
+=== Version 1.01 - wakou
+
+1999/11/29 21:35:58
+
+- support for ruby 1.5.0 (1999-11-20)
+
=== Version 1.00 - wakou
1999/09/13 23:00:58