  We present the measurement of the energy dependence of the boron flux in
cosmic rays and its ratio to the carbon flux \textcolor{black}{in an energy
interval from 8.4 GeV$/n$ to 3.8 TeV$/n$} based on the data collected by the
CALorimetric Electron Telescope (CALET) during $\sim 6.4$ years of operation on
the International Space Station. An update of the energy spectrum of carbon is
also presented with an increase in statistics over our previous measurement.
The observed boron flux shows a spectral hardening at the same transition
energy $E_0 \sim 200$ GeV$/n$ of the C spectrum, though B and C fluxes have
different energy dependences. The spectral index of the B spectrum is found to
be $\gamma = -3.047\pm0.024$ in the interval $25 < E < 200$ GeV$/n$. The B
spectrum hardens by $\Delta \gamma_B=0.25\pm0.12$, while the best fit value for
the spectral variation of C is $\Delta \gamma_C=0.19\pm0.03$. The B/C flux
ratio is compatible with a hardening of $0.09\pm0.05$, though a single
power-law energy dependence cannot be ruled out given the current statistical
uncertainties. A break in the B/C ratio energy dependence would support the
recent AMS-02 observations that secondary cosmic rays exhibit a stronger
hardening than primary ones. We also perform a fit to the B/C ratio with a
leaky-box model of the cosmic-ray propagation in the Galaxy in order to probe a
possible residual value $\lambda_0$ of the mean escape path length $\lambda$ at
high energy. We find that our B/C data are compatible with a non-zero value of
$\lambda_0$, which can be interpreted as the column density of matter that
cosmic rays cross within the acceleration region.
