From 79c2d60971501ea6cb8304a9c860bac0bc2bee94 Mon Sep 17 00:00:00 2001 From: aamine Date: Wed, 16 Aug 2000 19:26:07 +0000 Subject: aamine * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.27. * lib/net/protocol.rb: writing methods returns written byte size. * lib/net/smtp.rb: send_mail accepts many destinations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/protocol.rb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'lib/net/protocol.rb') diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb index b351c268bd..16d6cac747 100644 --- a/lib/net/protocol.rb +++ b/lib/net/protocol.rb @@ -1,11 +1,12 @@ =begin -= net/protocol.rb version 1.1.27 += net/protocol.rb version 1.1.28 written by Minero Aoki -This library is distributed under the terms of the Ruby license. -You can freely distribute/modify this library. +This program is free software. +You can distribute/modify this program under +the terms of the Ruby Distribute License. == Net::Protocol @@ -64,7 +65,7 @@ module Net class Protocol - Version = '1.1.27' + Version = '1.1.28' class << self @@ -75,7 +76,7 @@ module Net if iterator? then instance.start( *args ) { yield instance } else - instance.start *args + instance.start( *args ) instance end end @@ -164,7 +165,7 @@ module Net begin connect - do_start *args + do_start( *args ) @active = true yield self if iterator? ensure @@ -639,10 +640,13 @@ module Net def wpend_in( src ) line = nil + pre = @writtensize each_crlf_line( src ) do |line| do_write '.' if line[0] == ?. do_write line end + + @writtensize - pre end def use_each_crlf_line -- cgit v1.2.3