The ratio of nuclear modification factors of high−pT heavy-flavored mesons to light-flavored hadrons (heavy-to-light ratio) is shown to be a sensitive tool to test medium-induced energy loss at RHIC and LHC energies. Heavy-to-light ratios of D mesons at the Relativistic Heavy Ion Collider RHIC in the region 7