summaryrefslogtreecommitdiff
path: root/lib/net/protocol.rb
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-12 11:45:28 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-12 11:45:28 +0000
commitd589b366bc52ad04ffd1bb3a989a45d66165deb6 (patch)
tree08cbb4fd36e58d2f248d6c281d177b4c80a7e902 /lib/net/protocol.rb
parent8bc9475793bd3218da4cd58570d6d9a6e7fd3548 (diff)
downloadruby-d589b366bc52ad04ffd1bb3a989a45d66165deb6.tar.gz
* lib/net/protocol.rb (WriteAdapater#puts): must append "\n" to the string, don't prepend. (ruby-bugs:PR#1280)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/protocol.rb')
-rw-r--r--lib/net/protocol.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb
index 316f5e51a2..e31244cb1b 100644
--- a/lib/net/protocol.rb
+++ b/lib/net/protocol.rb
@@ -404,7 +404,7 @@ module Net # :nodoc:
end
def puts( str = '' )
- write str.sub(/\n?/, "\n")
+ write str.sub(/\n?\z/, "\n")
end
def printf( *args )