I have a question on Corollary of Lusin's Theorem in Rudin's Real and Complex analysis (3rd edition, page 56). Here Rudin explicitly requires that $|f| \leq 1$. But I can not see why this requirement is necessary. I can not even see why $|f|$ should be bounded above. Thanks.
The corollary states: Assume the hypotheses of Lusin's Theorem are satisfied and that $|f| \leq 1$. Then there is a sequence $\{g_n \}$ such that $g_n \in C_c(X), |g_n| \leq 1, $ and
$f(x) = lim_{n\rightarrow \infty} g_n(x)$ a.e.
The conditions of Lusin's theorem are that f is complex measurable, X is locally compact and Hausdorff, $\mu(A)<\infty, f(x)=0$ if $x\notin A. $