The justices ruled 5-4 that the law applied to a Virginia man who bought a gun with the intention of transferring it to his uncle in Pennsylvania - even though the uncle is not prohibited from owning firearms.