Created
June 15, 2026 18:08
-
-
Save manewitz/04c3a4eaf901cfaf11ea6de6ea84d68a to your computer and use it in GitHub Desktop.
in-line progress updates with carriage return
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NUM = 1000000 | |
| puts "Counting to #{NUM}..." | |
| (1..NUM).to_a.each do |i| | |
| print "\ri = #{i}" | |
| end;nil | |
| puts "\nDone!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment