Are points in different connected components separated by open subsets? Decide if the following statement is true or false:

If $a,b \in M$ belong to different connected components, then there exists a disconnection $M = A \cup B$ (with $A$, $B$ open and disjoint), with $a \in A$ and $b \in B$.

(Hint: consider $a = (0,0)$, $b = (0,1)$ , $X = \{(1/n,y) \in \mathbb{R}^2, n \in \mathbb{N}, y \in \mathbb{R} \}$ 
and $M = X \cup \{a,b\}$ )"
I've trying to do it, but I can't prove that $M$ is a counterexample for the statement above. Could you help me?

First let's show $a$ and $b$ are in different components of $M$.  Well, the component of $a$ in $M$ is simply $\{a\}$: Let $S$ be any subset of $M$ properly containing $\{a\}$.  If $S=\{a,b\}$ then clearly $S$ is not connected.  If $S$ hits one of the vertical lines, say $J_n=\{1/n\}\times \mathbb R$, then since $J_n$ is clopen in $M$ we have $S\cap J_n$ a proper clopen subset of $S$, whence $S$ is not connected. Similarly, the component of $b$ in $M$ is $\{b\}$.
Now I will paraphrase Stefan's answer and show there is no disconnection of $X$ between $a$ and $b$. Let $A\subseteq M$ be clopen containing $a$.  Then $A$ intersects a tail of the $J_n$'s.  Since the $J_n$'s are connected we must have this tail of $J_n$'s contained in $A$.  It is now easy to see that $b\in A$.
