From: 7stud -- Date: 2009-10-07T11:58:33+09:00 Subject: Re: How to not display output of a system call. Jerry Piazza wrote: > I am now trying to impliment this. > > I created this: > def spinner spin_trigger > while (spin_trigger == true) > print "\\\r" > sleep 1 > print "|\r" > sleep 1 > print "/\r" > sleep 1 > print "-\r" > sleep 1 > end > end > > spin = true > Thread.new do > spinner spin > end > files = Dir.glob("c:/**/*.txt") > spin = false > > But all I get is a "\" stuck at the beginning of the line until the Dir > command finishes. > > Maybe I am confused about the usage of Thread? I think you have some more basic issues to deal with first. What do you think the output of the following code will be: def test(x) while x == 20 sleep 3 puts x end end x = 10 test(20) x = 30 -- Posted via http://www.ruby-forum.com/.