diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-02-25 06:52:43 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-02-25 06:52:43 +0000 |
commit | ba2d46829afada0ecc878df16b04078b13c6cfd9 (patch) | |
tree | a7403d95e2a7f658160e623eec8568c1969b5165 /lib/cgi-lib.rb | |
parent | 6bab1e5abd81d57fe1046a7acc7f699ab6ee3190 (diff) |
reserved words & etc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@91 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/cgi-lib.rb')
-rw-r--r-- | lib/cgi-lib.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/cgi-lib.rb b/lib/cgi-lib.rb index 7c46fb5955..02720b2835 100644 --- a/lib/cgi-lib.rb +++ b/lib/cgi-lib.rb @@ -45,7 +45,7 @@ class CGI end module_function :escape, :unescape - def initialize + def initialize(input = $stdin) # exception messages should be printed to stdout. STDERR.reopen(STDOUT) @@ -54,7 +54,7 @@ class CGI when "GET" ENV['QUERY_STRING'] or "" when "POST" - $stdin.read ENV['CONTENT_LENGTH'].to_i + input.read ENV['CONTENT_LENGTH'].to_i else read_from_cmdline end.split(/&/).each do |x| |