summaryrefslogtreecommitdiff
path: root/lib/net/protocol.rb
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-02 15:19:20 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-02 15:19:20 +0000
commite221d6826a67e6e2fc3e12303e4e070452069b2e (patch)
treec5170f5fa68888ff79fdda063d1f3ac9121029b9 /lib/net/protocol.rb
parente3056c880364f5cb79eb9280b4d34b34c3eb4f93 (diff)
downloadruby-e221d6826a67e6e2fc3e12303e4e070452069b2e.tar.gz
* lib/net/protocol.rb: reintroduce Protocol.protocol_param.
* lib/net/http.rb: ditto. * lib/net/pop.rb: ditto. * lib/net/smtp.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/protocol.rb')
-rw-r--r--lib/net/protocol.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb
index fd85771dd5..c4dcce9e44 100644
--- a/lib/net/protocol.rb
+++ b/lib/net/protocol.rb
@@ -24,6 +24,17 @@ require 'timeout'
module Net
+ class Protocol
+ private
+ def Protocol.protocol_param( name, val )
+ module_eval(<<-End, __FILE__, __LINE__ + 1)
+ def #{name}
+ #{val}
+ end
+ End
+ end
+ end
+
class ProtocolError < StandardError; end
class ProtoSyntaxError < ProtocolError; end
class ProtoFatalError < ProtocolError; end