Pretty sure it can't. There might be an issue if it were operting with a magnet nearby, but it would most likely be data corruption, and that's no harm to the RAM itself.
The reason you aren't suppossed to get magnets near hard drves is because they use magnetism to store data, and introducing another magnet could possibly corrupt the data and make it useless, but it doesn't actually harm the hard drive in that case either. Since RAM doesn't store data in this way, it should be safe.
Magnets can also alter the data in a flash medium, supposedly, but I can't vouch for the accuracy of that since I don't know how it works.