I have a book, Ergodic problems of classical mechanics by Arnold/Avez, and in it they prove that rotation $Tx = x+a \pmod 1$ of the circle $M=\{x \pmod 1\}$ is Ergodic if and only if a is irrational. In it they use an earlier corollary that a system is ergodic if and only if any invariant measurable absolutely integrable function is constant a.e. So the start proof goes like this:
Suppose $a$ is rational, then write $a=p/q$, $p,q$ coprime. Since $e^{2\pi qx}$ is nonconstant and measurable, $T$ is not ergodic.
This is fine, but then how come I can't make a similar argument for irrational $a$? As in: Suppose $a$ is irrational, then $e^{2\pi x/a}$ is nonconstant, and it seems to be measurable and absolutely integrable.
What did I do wrong?