Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby Ruby Blocks Working With Blocks Build a Simple Benchmarker

Dots printing all at once at the end instead of printing at intervals with every loop ending

***Using Ruby 1.8.7

Here's the link to the code:

https://github.com/black789/Treehouse/blob/master/benchmarker.rb

2 Answers

Jay McGavren
STAFF
Jay McGavren
Treehouse Teacher

sindhu shree I can't try this myself, because as I said your code works as-is for me. But you might find a partial solution here: https://stackoverflow.com/questions/29998728/what-stdout-sync-true-means

The solution from this link worked for me. Thanks

Jay McGavren
STAFF
Jay McGavren
Treehouse Teacher

Your code works exactly as it is for me, printing the dots as it goes. I ran it under Ruby 2.3.0.

Ruby 1.8.7 is a very old version. That may be part of the problem. It might be a good idea to update it.

I can't update because the firm I work with uses this particular version. Isn't there a workaround for this kind of problem?