I have cycled for many years in a couple poor areas of Montreal. The worse that ever happened is getting shot with a BB gun from a moving car at 1 AM after coming back from work. I was cycling at 30 km/h, no guns ( I am Canadian, no weapons for us), they missed me.
Would carrying a gun made a difference? Probably not.
Gun and spandex... do you think Lance Armstrong should pack a Glock for the next Tour de France? Maybe he could avoid getting attacked by a deranged French man if they knew he had a gun in his jersey.