  By an influential theorem of Boman, a function $f$ on an open set $U$ in
$\mathbb R^d$ is smooth ($\mathcal C^\infty$) if and only if it is arc-smooth,
i.e., $f\circ c$ is smooth for every smooth curve $c : \mathbb R \to U$. In
this paper we investigate the validity of this result on closed sets. Our main
focus is on sets which are the closure of their interior, so-called fat sets.
We obtain an analogue of Boman's theorem on fat closed sets with H\"older
boundary and on fat closed subanalytic sets with the property that every
boundary point has a basis of neighborhoods each of which intersects the
interior in a connected set. If $X \subseteq \mathbb R^d$ is any such set and
$f : X \to \mathbb R$ is arc-smooth, then $f$ extends to a smooth function
defined on $\mathbb R^d$. We also get a version of the Bochnak-Siciak theorem
on all closed fat subanalytic and all closed sets with H\"older boundary: if $f
: X \to \mathbb R$ is the restriction of a smooth function on $\mathbb R^d$
which is real analytic along all real analytic curves in $X$, then $f$ extends
to a holomorphic function on a neighborhood of $X$ in $\mathbb C^d$. Similar
results hold for non-quasianalytic Denjoy-Carleman classes (of Roumieu type).
We will also discuss sharpness and applications of these results.
