From 3efa5181dc7f2226daf2bc0d09ae1e73cd3a7601 Mon Sep 17 00:00:00 2001 From: yugui Date: Sat, 30 Jan 2010 12:44:58 +0000 Subject: merges r25263 from trunk into ruby_1_9_1. -- * lib/net/telnet.rb (cmd): Pass FailEOF options: patch by Brian Candler [ruby-core:22723] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/net/telnet.rb | 6 ++++-- version.h | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0f7f8049ae..887afdf907 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Oct 9 00:33:29 2009 Marc-Andre Lafortune + + * lib/net/telnet.rb (cmd): Pass FailEOF options: patch by Brian + Candler [ruby-core:22723] + Mon Oct 5 17:19:33 2009 Yukihiro Matsumoto * lib/delegate.rb (Delegator::public_api): take snapshot of diff --git a/lib/net/telnet.rb b/lib/net/telnet.rb index 67fd656c63..47587c7122 100644 --- a/lib/net/telnet.rb +++ b/lib/net/telnet.rb @@ -681,20 +681,22 @@ module Net 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 diff --git a/version.h b/version.h index 0a5aa1e015..6ab9fc6f6b 100644 --- a/version.h +++ b/version.h @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.1" -#define RUBY_PATCHLEVEL 380 +#define RUBY_PATCHLEVEL 381 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 -- cgit v1.2.3