diff options
| -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 ) |
