aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeg2 <jeg2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-17 14:04:48 +0000
committerjeg2 <jeg2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-17 14:04:48 +0000
commitb2c5258b854e6a19306300428718d5c83303a85b (patch)
tree6f754b466dc67b7d0efa12cef27bfc2ff270b002
parent3e30cdad087fb4cb7a6e320f1934937e9688c919 (diff)
downloadruby-b2c5258b854e6a19306300428718d5c83303a85b.tar.gz
* lib/net/telnet.rb: Fixing Telnet#wairfor() which was broken by changes to
the Kernel::Integer() method. [ruby-core:17272] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/net/telnet.rb4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ee37393867..0faa7067bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jun 17 23:04:24 2008 James Edward Gray II <jeg2@ruby-lang.org>
+
+ * lib/net/telnet.rb: Fixing Telnet#wairfor() which was broken by changes to
+ the Kernel::Integer() method. [ruby-core:17272]
+
Tue Jun 17 23:02:18 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ruby.c (opt_W_getter): made a hooked variable.
diff --git a/lib/net/telnet.rb b/lib/net/telnet.rb
index d2433554a2..67fd656c63 100644
--- a/lib/net/telnet.rb
+++ b/lib/net/telnet.rb
@@ -564,8 +564,8 @@ module Net
@dumplog.log_dump('<', c) if @options.has_key?("Dump_log")
if @options["Telnetmode"]
c = rest + c
- if Integer(c.rindex(/#{IAC}#{SE}/no)) <
- Integer(c.rindex(/#{IAC}#{SB}/no))
+ if Integer(c.rindex(/#{IAC}#{SE}/no) || 0) <
+ Integer(c.rindex(/#{IAC}#{SB}/no) || 0)
buf = preprocess(c[0 ... c.rindex(/#{IAC}#{SB}/no)])
rest = c[c.rindex(/#{IAC}#{SB}/no) .. -1]
elsif pt = c.rindex(/#{IAC}[^#{IAC}#{AO}#{AYT}#{DM}#{IP}#{NOP}]?\z/no) ||