From 287a34ae0dfc23e4158f67cb7783d239f202c368 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 6 Mar 2009 03:56:38 +0000 Subject: * {ext,lib,test}/**/*.rb: removed trailing spaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/cgi/core.rb | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'lib/cgi/core.rb') diff --git a/lib/cgi/core.rb b/lib/cgi/core.rb index 95cf423d83..69c7f28603 100644 --- a/lib/cgi/core.rb +++ b/lib/cgi/core.rb @@ -13,7 +13,7 @@ class CGI REVISION = '$Id$' #:nodoc: - NEEDS_BINMODE = true if /WIN/i.match(RUBY_PLATFORM) + NEEDS_BINMODE = true if /WIN/i.match(RUBY_PLATFORM) # Path separators in different environments. PATH_SEPARATOR = {'UNIX'=>'/', 'WINDOWS'=>'\\', 'MACINTOSH'=>':'} @@ -48,7 +48,7 @@ class CGI # :startdoc: - def env_table + def env_table ENV end @@ -79,7 +79,7 @@ class CGI # status:: the HTTP status code, returned as the Status header. See the # list of available status codes below. # server:: the server software, returned as the Server header. - # connection:: the connection type, returned as the Connection header (for + # connection:: the connection type, returned as the Connection header (for # instance, "close". # length:: the length of the content that will be sent, returned as the # Content-Length header. @@ -89,19 +89,19 @@ class CGI # object, returned as the Expires header. # cookie:: a cookie or cookies, returned as one or more Set-Cookie headers. # The value can be the literal string of the cookie; a CGI::Cookie - # object; an Array of literal cookie strings or Cookie objects; or a + # object; an Array of literal cookie strings or Cookie objects; or a # hash all of whose values are literal cookie strings or Cookie objects. # These cookies are in addition to the cookies held in the # @output_cookies field. # # Other header lines can also be set; they are appended as key: value. - # + # # header # # Content-Type: text/html - # + # # header("text/plain") # # Content-Type: text/plain - # + # # header("nph" => true, # "status" => "OK", # == "200 OK" # # "status" => "200 GOOD", @@ -116,9 +116,9 @@ class CGI # "cookie" => [cookie1, cookie2], # "my_header1" => "my_value" # "my_header2" => "my_value") - # + # # The status codes are: - # + # # "OK" --> "200 OK" # "PARTIAL_CONTENT" --> "206 Partial Content" # "MULTIPLE_CHOICES" --> "300 Multiple Choices" @@ -137,8 +137,8 @@ class CGI # "NOT_IMPLEMENTED" --> "501 Method Not Implemented" # "BAD_GATEWAY" --> "502 Bad Gateway" # "VARIANT_ALSO_VARIES" --> "506 Variant Also Negotiates" - # - # This method does not perform charset conversion. + # + # This method does not perform charset conversion. def header(options='text/html') if options.is_a?(String) content_type = options @@ -277,13 +277,13 @@ class CGI # # Content-Length: 6 # # # # string - # + # # cgi.out("text/plain") { "string" } # # Content-Type: text/plain # # Content-Length: 6 # # # # string - # + # # cgi.out("nph" => true, # "status" => "OK", # == "200 OK" # "server" => ENV['SERVER_SOFTWARE'], @@ -296,16 +296,16 @@ class CGI # "cookie" => [cookie1, cookie2], # "my_header1" => "my_value", # "my_header2" => "my_value") { "string" } - # + # # Content-Length is automatically calculated from the size of # the String returned by the content block. # # If ENV['REQUEST_METHOD'] == "HEAD", then only the header # is outputted (the content block is still required, but it # is ignored). - # + # # If the charset is "iso-2022-jp" or "euc-jp" or "shift_jis" then - # the content is converted to this charset, and the language is set + # the content is converted to this charset, and the language is set # to "ja". def out(options = "text/html") # :yield: @@ -358,7 +358,7 @@ class CGI # Mixin module. It provides the follow functionality groups: # - # 1. Access to CGI environment variables as methods. See + # 1. Access to CGI environment variables as methods. See # documentation to the CGI class for a list of these variables. # # 2. Access to cookies, including the cookies attribute. @@ -617,7 +617,7 @@ class CGI # Get the value for the parameter with a given key. # - # If the parameter has multiple values, only the first will be + # If the parameter has multiple values, only the first will be # retrieved; use #params() to get the array of values. def [](key) params = @params[key] @@ -658,7 +658,7 @@ class CGI # This default value default is "UTF-8" # If you want to change the default accept character set # when create a new CGI instance, set this: - # + # # CGI.accept_charset = "EUC-JP" # @@ -700,11 +700,11 @@ class CGI # # == block # - # When you use a block, you can write a process + # When you use a block, you can write a process # that query encoding is invalid. Example: # # encoding_error={} - # cgi=CGI.new(:accept_charset=>"EUC-JP") do |name,value| + # cgi=CGI.new(:accept_charset=>"EUC-JP") do |name,value| # encoding_error[key] = value # end # -- cgit v1.2.3