* lib/cgi/util.rb: Improve documentation. Patch by Clinton Nixon.
[Ruby 1.9 - Bug #4733] * lib/cgi/core.rb: ditto * lib/cgi/cookie.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ebce1b4bd6
commit
34276148c4
@ -1,3 +1,10 @@
|
|||||||
|
Thu May 19 06:06:07 2011 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
|
* lib/cgi/util.rb: Improve documentation. Patch by Clinton Nixon.
|
||||||
|
[Ruby 1.9 - Bug #4733]
|
||||||
|
* lib/cgi/core.rb: ditto
|
||||||
|
* lib/cgi/cookie.rb: ditto
|
||||||
|
|
||||||
Thu May 19 06:02:21 2011 Eric Hodel <drbrain@segment7.net>
|
Thu May 19 06:02:21 2011 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
* lib/tempfile.rb: Document Dir.mkdir and Dir.rmdir. Patch by Clinton
|
* lib/tempfile.rb: Document Dir.mkdir and Dir.rmdir. Patch by Clinton
|
||||||
|
@ -104,10 +104,12 @@ class CGI
|
|||||||
# True if this cookie is secure; false otherwise
|
# True if this cookie is secure; false otherwise
|
||||||
attr_reader("secure")
|
attr_reader("secure")
|
||||||
|
|
||||||
|
# Returns the value or list of values for this cookie.
|
||||||
def value
|
def value
|
||||||
self
|
self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Replaces the value of this cookie with a new value or list of values.
|
||||||
def value=(val)
|
def value=(val)
|
||||||
replace(Array(val))
|
replace(Array(val))
|
||||||
end
|
end
|
||||||
|
@ -46,14 +46,17 @@ class CGI
|
|||||||
|
|
||||||
# :startdoc:
|
# :startdoc:
|
||||||
|
|
||||||
|
# Synonym for ENV.
|
||||||
def env_table
|
def env_table
|
||||||
ENV
|
ENV
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Synonym for $stdin.
|
||||||
def stdinput
|
def stdinput
|
||||||
$stdin
|
$stdin
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Synonym for $stdout.
|
||||||
def stdoutput
|
def stdoutput
|
||||||
$stdout
|
$stdout
|
||||||
end
|
end
|
||||||
@ -705,14 +708,17 @@ class CGI
|
|||||||
|
|
||||||
@@accept_charset="UTF-8"
|
@@accept_charset="UTF-8"
|
||||||
|
|
||||||
|
# Return the accept character set for all new CGI instances.
|
||||||
def self.accept_charset
|
def self.accept_charset
|
||||||
@@accept_charset
|
@@accept_charset
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Set the accept character set for all new CGI instances.
|
||||||
def self.accept_charset=(accept_charset)
|
def self.accept_charset=(accept_charset)
|
||||||
@@accept_charset=accept_charset
|
@@accept_charset=accept_charset
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Return the accept character set for this CGI instance.
|
||||||
attr_reader :accept_charset
|
attr_reader :accept_charset
|
||||||
|
|
||||||
# Create a new CGI instance.
|
# Create a new CGI instance.
|
||||||
|
@ -83,9 +83,13 @@ class CGI
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Synonym for CGI.escapeHTML.
|
||||||
def CGI::escape_html(str)
|
def CGI::escape_html(str)
|
||||||
escapeHTML(str)
|
escapeHTML(str)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Synonym for CGI.unescapeHTML.
|
||||||
def CGI::unescape_html(str)
|
def CGI::unescape_html(str)
|
||||||
unescapeHTML(str)
|
unescapeHTML(str)
|
||||||
end
|
end
|
||||||
@ -134,9 +138,13 @@ class CGI
|
|||||||
string
|
string
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Synonym for CGI.escapeElement.
|
||||||
def CGI::escape_element(str)
|
def CGI::escape_element(str)
|
||||||
escapeElement(str)
|
escapeElement(str)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Synonym for CGI.unescapeElement.
|
||||||
def CGI::unescape_element(str)
|
def CGI::unescape_element(str)
|
||||||
unescapeElement(str)
|
unescapeElement(str)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user