I’ll add just a few thoughts. If you are just walking through an area that may have bears, it’s a good idea to make noise as you go. My personal policy is if you see a bear first and are reasonably sure the bear hasn’t seen you, the last thing I do is yell and I’d head a different direction than the bear, and do it quietly. The last thing I’m going to do is make the bear aware of my presence. I just think that’s a bad policy. Although I know a guy that survived a brown bear attack with a Buck 110 folding knife, like the guy in the story didn’t fare well. He was fairly seriously injured. In the situation this guy was in and not supposed to be carrying a handgun I would carry a sharp fixed blade knife, among those I already have would be a Buck 119, 120, or 124, or a Gerber casket handle, bowie knife.
My impression was the guy had previously seen black bears and assuming that could happen again, I would figure out a way to sneak out a compact high capacity 9mm with 147 grain hard casts, Ruger SP101 with 180 gr HC, Charter Arms Bulldog 44 Special with 200 gr cast, my S&W model 69 with the 2-3/4” barrel with a heavy hard cast 240 grain bullet, or maybe even a Ruger Alaskan in your favorite flavor. Kept concealed no one should know, unless you need it. At that point, if you have to use a gun preventing being malled or worse if it costs your job, you are still ahead of the game. Even in Canada many folks carry a large hunting knife, for the same reason. Minimum 6” blade.
Having said all that, I don’t have a lot of confidence in Bear Spray, for black bears, if it comes down to it, and the Bear leaves the area, you should also evacuate the area, if the bear is predatory will probably be back looking for his meal.
The guns I chose were for concealment. Black bears aren’t extremely difficult to kill as they are thin skinned and light boned. I wanted to add this since I hadn’t made it clear earlier.
I know of a guy that killed a brown bear with a S&W 3913 with a 147 grain Buffalo Bore bullet. Not on purpose but that’s what he had.