We present the measurement of the energy dependence of the boron flux in cosmic rays and its ratio to the carbon flux 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 ∼6.4 yr 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}∼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 γ=-3.047±0.024 in the interval 25<E<200 GeV/n. The B spectrum hardens by Δγ_{B}=0.25±0.12, while the best fit value for the spectral variation of C is Δγ_{C}=0.19±0.03. The B/C flux ratio is compatible with a hardening of 0.09±0.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 λ_{0} of the mean escape path length λ at high energy. We find that our B/C data are compatible with a nonzero value of λ_{0}, which can be interpreted as the column density of matter that cosmic rays cross within the acceleration region.