зеркало из https://github.com/github/ruby.git
* 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]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
453c63c01b
Коммит
d124dcf4eb
|
@ -1,3 +1,9 @@
|
||||||
|
Fri Apr 9 23:58:58 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
|
* 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@tsg.ne.jp>
|
Fri Apr 9 23:57:35 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
* ext/pty/lib/expect.rb: add rdoc. based on a patch from Luiz Angelo
|
* ext/pty/lib/expect.rb: add rdoc. based on a patch from Luiz Angelo
|
||||||
|
|
|
@ -14,6 +14,8 @@ class IO
|
||||||
e_pat = Regexp.new(Regexp.quote(pat))
|
e_pat = Regexp.new(Regexp.quote(pat))
|
||||||
when Regexp
|
when Regexp
|
||||||
e_pat = pat
|
e_pat = pat
|
||||||
|
else
|
||||||
|
raise TypeError, "unsupported pattern class: #{pattern.class}"
|
||||||
end
|
end
|
||||||
while true
|
while true
|
||||||
if !IO.select([self],nil,nil,timeout) or eof? then
|
if !IO.select([self],nil,nil,timeout) or eof? then
|
||||||
|
|
Загрузка…
Ссылка в новой задаче