Syntax matters for (int i=0; i<3; i++) { do_something() } 3.times do do_something end