diff options
| author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-26 14:09:44 +0000 |
|---|---|---|
| committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-26 14:09:44 +0000 |
| commit | d0dea3fd4435da335ac5ae6319a0d1bd8496f707 (patch) | |
| tree | 536136bdd68aa52c6fcfe2146a387dc1140e10f8 | |
| parent | f1b69192e5faee3fab1f9df8573da89b5d878f01 (diff) | |
| download | ruby-d0dea3fd4435da335ac5ae6319a0d1bd8496f707.tar.gz ruby-d0dea3fd4435da335ac5ae6319a0d1bd8496f707.tar.xz ruby-d0dea3fd4435da335ac5ae6319a0d1bd8496f707.zip | |
* lib/net/protocol.rb (WriteAdapter#puts): should append \n, not prepend. [ruby-talk:128302] (backport from HEAD, rev 1.75)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | lib/net/protocol.rb | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Wed Jan 26 23:09:11 2005 Minero Aoki <aamine@loveruby.net> + + * lib/net/protocol.rb (WriteAdapter#puts): should append \n, not + prepend. [ruby-talk:128302] (backport from HEAD, rev 1.75) + Wed Jan 26 10:51:50 2005 NAKAMURA Usaku <usa@ruby-lang.org> * win32/win32.c (flock_winnt, flock_win95): unlock file even if diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb index ac6bce105..b527956c9 100644 --- a/lib/net/protocol.rb +++ b/lib/net/protocol.rb @@ -403,7 +403,7 @@ module Net # :nodoc: end def puts( str = '' ) - write str.sub(/\n?/, "\n") + write str.chomp("\n") + "\n" end def printf( *args ) |
