There are a couple of YouTube videos about this, my guess is that your friend's problem is similar to Pyro's (watch both his videos, part 1 and part 2.)
The slide stop lever is a "balanced" part - meaning that there is spring pressure that forces it "down" all the time, and then, when the magazine follower contacts that little tab on an empty magazine, it overwhelms that spring pressure and forces the slide lock to move upward and....lock the slide back. You can see what happens if something is wrong by watching his videos. This is back in 2013: maybe your friend has one of those guns -- even though it's new that doesn't mean "just manufactured."
Part I:
https://www.youtube.com/watch?v=EzuKfLR5t4k
Part II:
https://www.youtube.com/watch?v=KA9Njeyeldo
He can check the serial number by production year here:
http://www.ruger.com/service/productHistory/PI-SR40c.html
The Slide Stop Spring is Part #32 on the diagram on page 44 of the manual, here:
https://ruger-docs.s3.amazonaws.com/_manuals/srSeries.pdf
It's just a little itty bitty thing. My guess is that his is either missing, broken or somehow not anchored properly inside the gun, and that's letting the slide stop "flap around" and lock the slide back when it's not supposed to.
That should be a simple and easy fix for Ruger. I'll bet dollars to donuts it's a bad spring on the slide lock assembly, they'll fix it fast and he'll be happy again.