ruby-changes:5880
From: jeg2 <ko1@a...>
Date: Tue, 17 Jun 2008 23:05:43 +0900 (JST)
Subject: [ruby-changes:5880] Ruby:r17387 (trunk): * lib/net/telnet.rb: Fixing Telnet#wairfor() which was broken by changes to
jeg2 2008-06-17 23:04:48 +0900 (Tue, 17 Jun 2008) New Revision: 17387 Modified files: trunk/ChangeLog trunk/lib/net/telnet.rb Log: * lib/net/telnet.rb: Fixing Telnet#wairfor() which was broken by changes to the Kernel::Integer() method. [ruby-core:17272] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=17387&r2=17386&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/net/telnet.rb?r1=17387&r2=17386&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 17386) +++ ChangeLog (revision 17387) @@ -1,3 +1,8 @@ +Tue Jun 17 23:04:24 2008 James Edward Gray II <jeg2@r...> + + * 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@r...> * ruby.c (opt_W_getter): made a hooked variable. Index: lib/net/telnet.rb =================================================================== --- lib/net/telnet.rb (revision 17386) +++ lib/net/telnet.rb (revision 17387) @@ -564,8 +564,8 @@ @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) || -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/