Yep it was the toughest form of discipline in the army, and was kept in force throughout the entire Roman era. It worked most of time; the thought of being killed by your own comrades (ranks were included) was enough to stop them running in battle.