And when she saw that the potion had worked , and that he was sound asleep , the Princess took the magic ring from his finger , and , going into the courtyard , she threw it from the palm of one hand into the other .