The Peg and the Pendulum

A pendulum is set up such that its suspension cord strikes a peg just as it passes though the vertical. It then observed that the bob rises an equal distance from the table whether or not the length is shortened by the peg, due to the conservation of energy.