Dear student,
The meter scale could be at rest when reaching at the top to just complete the circle, unlike the case of ball tied to a string.
So the whole rotational kinetic energy of the ruler would go into the gain in gravitational potential energy.
If the horizontal speed of end of the ruler of length

is

, angular velocity of the same will be

.
From conservation of energy,


