Ramanujan presented (without proof) the following double inequality for the gamma function:\begin{equation}\sqrt{\pi}\Bigl(\frac{x}{e}\Bigr)^x\Bigl[8x^3+4x^2+x+\frac{1}{100}\Bigr]^{1/6} < \Gamma(x+1)< \sqrt{\pi}\Bigl(\frac{x}{e}\Bigr)^x\Bigl[8x^3+4x^2+x+\frac{1}{30}\Bigr]^{1/6} \quad{(x\geq 0)}.\end{equation}Recently, Karatsuba established that these inequalities hold for $x\geq 1$. We show that this can be slightly improved: the inequalities hold for all $x\geq 0$, even if we replace $1/100$ by \[\alpha= \min_{0.6\leq x\leq 0.7}f(x)=0.0100450\dots,\]where $f(x)=(1/\pi)^3[\Gamma(x+1)(e/x)^x]^6-8x^3-4x^2-x$. Moreover, $\alpha$ and $1/30$ are the best possible constant terms.