summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/net/imap.rb4
-rw-r--r--lib/net/telnet.rb8
-rw-r--r--lib/optparse.rb2
3 files changed, 11 insertions, 3 deletions
diff --git a/lib/net/imap.rb b/lib/net/imap.rb
index 2cbb408168..1007f2bdf6 100644
--- a/lib/net/imap.rb
+++ b/lib/net/imap.rb
@@ -263,7 +263,7 @@ Object
If this mailbox exists, an array containing objects of
((<Net::IMAP::MailboxACLItem>)) will be returned.
-: add_response_handler(handler = Proc.new)
+: add_response_handler(handler = Block.new)
Adds a response handler.
ex).
@@ -1047,7 +1047,7 @@ module Net
return sort_internal("UID SORT", sort_keys, search_keys, charset)
end
- def add_response_handler(handler = Proc.new)
+ def add_response_handler(handler = Block.new)
@response_handlers.push(handler)
end
diff --git a/lib/net/telnet.rb b/lib/net/telnet.rb
index b03cbc7a73..89bb8ef044 100644
--- a/lib/net/telnet.rb
+++ b/lib/net/telnet.rb
@@ -480,6 +480,14 @@ module Net
buf = preprocess(c)
rest = ''
end
+ else
+ # Not Telnetmode.
+ #
+ # We cannot use preprocess() on this data, because that
+ # method makes some Telnetmode-specific assumptions.
+ buf = c
+ buf.gsub!(/#{EOL}/no, "\n") unless @options["Binmode"]
+ rest = ''
end
@log.print(buf) if @options.has_key?("Output_log")
line += buf
diff --git a/lib/optparse.rb b/lib/optparse.rb
index 295f2bc94b..7a2cfc49c9 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -167,7 +167,7 @@ Individual switch class.
=end #'#"#`#
def initialize(pattern = nil, conv = nil,
short = nil, long = nil, arg = nil,
- desc = ([] if short or long), block = Proc.new)
+ desc = ([] if short or long), block = Block.new)
@pattern, @conv, @short, @long, @arg, @desc, @block =
pattern, conv, short, long, arg, desc, block
end