ruby-changes:15384
From: mame <ko1@a...>
Date: Sat, 10 Apr 2010 00:05:12 +0900 (JST)
Subject: [ruby-changes:15384] Ruby:r27276 (trunk): * ext/pty/lib/expect.rb: raise an error when argument is unexpected
mame 2010-04-10 00:04:54 +0900 (Sat, 10 Apr 2010) New Revision: 27276 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27276 Log: * ext/pty/lib/expect.rb: raise an error when argument is unexpected type. based on a patch from Luiz Angelo Daros de Luca in [ruby-core:23464]. Modified files: trunk/ChangeLog trunk/ext/pty/lib/expect.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 27275) +++ ChangeLog (revision 27276) @@ -1,3 +1,9 @@ +Fri Apr 9 23:58:58 2010 Yusuke Endoh <mame@t...> + + * ext/pty/lib/expect.rb: raise an error when argument is unexpected + type. based on a patch from Luiz Angelo Daros de Luca in + [ruby-core:23464]. + Fri Apr 9 23:57:35 2010 Yusuke Endoh <mame@t...> * ext/pty/lib/expect.rb: add rdoc. based on a patch from Luiz Angelo Index: ext/pty/lib/expect.rb =================================================================== --- ext/pty/lib/expect.rb (revision 27275) +++ ext/pty/lib/expect.rb (revision 27276) @@ -14,6 +14,8 @@ e_pat = Regexp.new(Regexp.quote(pat)) when Regexp e_pat = pat + else + raise TypeError, "unsupported pattern class: #{pattern.class}" end while true if !IO.select([self],nil,nil,timeout) or eof? then -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/