From: "E. Saynatkari" Date: 2006-02-24T05:09:14+09:00 Subject: Re: puts behaviour James Byrne wrote: > Daniel Harple wrote: > >> >> I don't quite know what you are asking, but -- >> >> If you do not want buffered output, set $stdout.sync = true (or >> $stderr). If $stdout.sync is false (and it is by default), the line >> will not be flushed until a newline. You could also just call IO#flush. >> >> -- Daniel > > Without examining the code, which is probably the next step, I speculate > that these '.'s are set by Test::Unit to provide support for some sort > of progress status bar. I am not sufficently well versed in Ruby (I > wrote my first non trival program in it last week) to have encountered > things like $stdout.sync and IO.flush. However, having this new > information combined with my previous experience with the mysterous '.'s > leads me to the inference above. > > This is no more than an inquiry as to why these things appeared > unexpectedly in my output, which happened to be directory strings > wherein a prefix of . has rather profound implications. Right, no, the '.' is just a progress indicator, one for each successful test_* method in your test case (you will see an 'F' for each failure and an 'E' for each error). The dots are output using #print rather than #puts, so they are not followed by newlines which means that your string will appear immediately after one. There should be a newline after your string, though (if not, then the framework strips those--I do not have access to test right now). > Thanks for the information. It clarifies a few items of confusion. > > Regards, > Jim E -- Posted via http://www.ruby-forum.com/.