Skip to content

Instantly share code, notes, and snippets.

@manewitz
Created June 15, 2026 18:08
Show Gist options
  • Select an option

  • Save manewitz/04c3a4eaf901cfaf11ea6de6ea84d68a to your computer and use it in GitHub Desktop.

Select an option

Save manewitz/04c3a4eaf901cfaf11ea6de6ea84d68a to your computer and use it in GitHub Desktop.
in-line progress updates with carriage return
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