# Is there a ring containing ideals where the union of the ideals forms a subring but not an ideal?

In general the union of two subrings is not a subring, and likewise for the union of two ideals. However, I was wondering if there exists an example of a union of ideals that is actually a subring but is not an ideal? I've tried looking around without any success so I imagine the answer is no.

If $$\{I_j\}_{j\in J}$$ is a non-empty family of ideals such that $$I:=\bigcup_{j\in J}I_j$$ is closed under addition (as required for a subring), then $$I$$ is already an ideal.