diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-02 16:45:35 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-02 16:45:35 +0000 |
commit | 29cef5f795043a048a58874d90de0dfe01aa12ea (patch) | |
tree | 6ae42a518c1c5705b8f097668d2b83413da0b6ec /lib/net | |
parent | 8815306dc5aadd777c887bbd8de7057598ad709c (diff) | |
download | ruby-29cef5f795043a048a58874d90de0dfe01aa12ea.tar.gz |
use Object#class instead of deprecated Object#type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
-rw-r--r-- | lib/net/pop.rb | 6 | ||||
-rw-r--r-- | lib/net/protocol.rb | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/net/pop.rb b/lib/net/pop.rb index af32e8835a..5966e6eecb 100644 --- a/lib/net/pop.rb +++ b/lib/net/pop.rb @@ -387,7 +387,7 @@ module Net def do_start( account, password ) conn_socket - @command = (@apop ? type.apop_command_type : type.command_type).new(socket()) + @command = (@apop ? self.class.apop_command_type : self.class.command_type).new(socket()) @command.auth account, password end @@ -408,7 +408,7 @@ module Net return @mails if @mails mails = [] - mtype = type.mail_type + mtype = self.class.mail_type command().list.each_with_index do |size,idx| mails.push mtype.new(idx, size, command()) if size end @@ -475,7 +475,7 @@ module Net attr :size def inspect - "#<#{type} #{@num}#{@deleted ? ' deleted' : ''}>" + "#<#{self.class} #{@num}#{@deleted ? ' deleted' : ''}>" end def pop( dest = '', &block ) diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb index df38725cb9..bdb60e158d 100644 --- a/lib/net/protocol.rb +++ b/lib/net/protocol.rb @@ -424,7 +424,7 @@ module Net end def inspect - "#<#{type} #{closed? ? 'closed' : 'opened'}>" + "#<#{self.class} #{closed? ? 'closed' : 'opened'}>" end ### @@ -584,7 +584,7 @@ module Net public def write_message( src ) - D_off "writing text from #{src.type}" + D_off "writing text from #{src.class}" wsize = using_each_crlf_line { wpend_in src @@ -723,7 +723,7 @@ module Net end def inspect - "#<#{type} socket=#{@socket.inspect}>" + "#<#{self.class} socket=#{@socket.inspect}>" end def write( str ) @@ -755,7 +755,7 @@ module Net end def inspect - "#<#{type}>" + "#<#{self.class}>" end def <<( str ) |