From: Marcin Tyman Date: 2007-06-20T20:08:35+09:00 Subject: Re: Net::Telnet Alex Young wrote: > Marcin Tyman wrote: >> if c =~ patternDup #patternDup is RegExp object >> } >> >> >> Without sleep sometimes comparison c with particular RegExp doesn't >> work. It isn't due to that regular expression doesn't match string >> compared with. >> After adding the sleep everything works well. > It sounds to me like either c or the regexp are modified by a different > thread, but without knowing where they come from (or, indeed, what t is > and what cmd is supposed to yield), it's difficult to guess any more... It's impossible that it is due to modification of c variable in other thread. This is local variable. So the regexp's. t is a Net::Telnet object. And I don't know what cmd is supposed to yield. Need to look into telnet.rb(???) -- Posted via http://www.ruby-forum.com/.