diff options
author | xibbar <xibbar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-12 14:19:53 +0000 |
---|---|---|
committer | xibbar <xibbar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-12 14:19:53 +0000 |
commit | 64486dfd8e8161e6864f039a0089c4a79bf4e2d2 (patch) | |
tree | 7a3dec2d70320f3a9c630a281d4b239cd894ecd8 | |
parent | bed9e8e297f2ba77b8a8ce45748804697fd9bfe1 (diff) | |
download | ruby-64486dfd8e8161e6864f039a0089c4a79bf4e2d2.tar.gz |
* lib/cgi/core.rb (read_from_cmdline): this code is better.
[ruby-core:25991]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/cgi/core.rb | 6 |
2 files changed, 6 insertions, 5 deletions
@@ -1,3 +1,8 @@ +Thu Nov 12 23:08:11 2009 Takeyuki FUJIOKA <xibbar@ruby-lang.org> + + * lib/cgi/core.rb (read_from_cmdline): this code is better. + [ruby-core:25991] + Thu Nov 12 22:55:42 2009 Takeyuki FUJIOKA <xibbar@ruby-lang.org> * lib/net/telnet.rb: don't use simple delegate. diff --git a/lib/cgi/core.rb b/lib/cgi/core.rb index 240d3bb714..3930663331 100644 --- a/lib/cgi/core.rb +++ b/lib/cgi/core.rb @@ -555,11 +555,7 @@ class CGI %|(offline mode: enter name=value pairs on standard input)\n| ) end - array = nil - begin - readlines - rescue - end + array = readlines rescue nil if not array.nil? array.join(' ').gsub(/\n/n, '') else |