ruby-changes:13487
From: marcandre <ko1@a...>
Date: Fri, 9 Oct 2009 00:34:33 +0900 (JST)
Subject: [ruby-changes:13487] Ruby:r25263 (trunk): * lib/net/telnet.rb (cmd): Pass FailEOF options: patch by Brian Candler
marcandre 2009-10-09 00:34:15 +0900 (Fri, 09 Oct 2009) New Revision: 25263 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25263 Log: * lib/net/telnet.rb (cmd): Pass FailEOF options: patch by Brian Candler [ruby-core:22723] Modified files: trunk/ChangeLog trunk/lib/net/telnet.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 25262) +++ ChangeLog (revision 25263) @@ -1,3 +1,8 @@ +Fri Oct 9 00:33:29 2009 Marc-Andre Lafortune <ruby-core@m...> + + * lib/net/telnet.rb (cmd): Pass FailEOF options: patch by Brian + Candler [ruby-core:22723] + Fri Oct 9 00:01:17 2009 Tanaka Akira <akr@f...> * ext/socket/lib/socket.rb (Socket.udp_server_recv): extracted from Index: lib/net/telnet.rb =================================================================== --- lib/net/telnet.rb (revision 25262) +++ lib/net/telnet.rb (revision 25263) @@ -681,20 +681,22 @@ def cmd(options) # :yield: recvdata match = @options["Prompt"] time_out = @options["Timeout"] + fail_eof = @options["FailEOF"] if options.kind_of?(Hash) string = options["String"] match = options["Match"] if options.has_key?("Match") time_out = options["Timeout"] if options.has_key?("Timeout") + fail_eof = options["FailEOF"] if options.has_key?("FailEOF") else string = options end self.puts(string) if block_given? - waitfor({"Prompt" => match, "Timeout" => time_out}){|c| yield c } + waitfor({"Prompt" => match, "Timeout" => time_out, "FailEOF" => fail_eof}){|c| yield c } else - waitfor({"Prompt" => match, "Timeout" => time_out}) + waitfor({"Prompt" => match, "Timeout" => time_out, "FailEOF" => fail_eof}) end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/