There are a number of different issues here.

Purely in terms of the mechanics you are suggesting, a ruler is made up of atomic or molecular matter, and there will be some time when you get to the size of an atom or molecule (actually, it will probably come even before then) when the physical ruler would become useless for measuring anything. This does not mean that smaller things cannot be measured, only that you would have to find other ways of measuring it.

Theoretically, there is not philosophical reason why one cannot keep subdividing space up an infinite number of times; but according to present scientific theory, there comes a point when you reach what is known as the

*Planck length*, where you could not discern a smaller region of space.

http://en.wikipedia.org/wiki/Plank_lengthThe Planck length, denoted by , is the unit of length approximately 1.6 × 10^{−35} metres. It is in the system of units known as Planck units. The Planck length is deemed "natural" because it can be defined from three fundamental physical constants: the speed of light, Planck's constant, and the gravitational constant.

Ignoring a factor of π, the Planck mass is roughly the mass of a black hole with a Schwarzschild radius equal to its Compton wavelength. The radius of such a black hole would be, roughly, the Planck length.

The following thought experiment illuminates this fact. The task is to measure an object's position by bouncing electromagnetic radiation, namely photons, off it. The shorter the wavelength of the photons, and hence the higher their energy, the more accurate the measurement. If the photons are sufficiently energetic to make possible a measurement more precise than a Planck length, their collision with the object would, in principle, create a minuscule black hole. This black hole would "swallow" the photon and thereby make it impossible to obtain a measurement. A simple calculation using dimensional analysis suggests that this problem arises if we attempt to measure an object's position with a precision to within a Planck length.

This thought experiment draws on both general relativity and the Heisenberg uncertainty principle of quantum mechanics. Combined, these two theories imply that it is impossible to measure position to a precision less than the Planck length, or duration to a precision greater than the time a photon traveling at c would take to travel a Planck length. This suggests that in a theory of quantum gravity combining general relativity and quantum mechanics, traditional notions of space and time may break down at distances shorter than the Planck length or times shorter than the Planck time.