A compass will deviate towards a metal object if it's placed next to it because of the magnetic attraction in that object.