It definatly depends on the situation with me, such as where I am, if I am alone, how the person acts, etc.
One time I saw a guy and his dog on the side of the road at an off ramp. It was raining and he looked really thin so since I'd just been paid, I went to the store and got a loaf of bread, some pb and j, some plastic utensils, a 12 pack of soda and some dog food and returned to the area. I gave him the bag of groceries and my umbrella. He said thank you and seemed rather surprised (maybe it was because at the time I was a 22 year old girl all alone). I told him I wished I could do more and the whole day I hoped I got jelly he liked, haha. I also hoped he had room in his backback for all the soda and stuff. Other times I've bought food and drink and returned to give it to them if they look like they're actually hungry/are asking for food. Haha, and I always wonder if I've gotten them something they like.
Other times, I just politely tell them I don't have any money and I'm sorry or I will give them a few dollars/some change. A lot of people say 'oh they'll just buy _____ with it,' but you know what? If that's the one thing that makes them not feel bad about being in the situation they're in, so what. They're adults who can make up their own mind. It's not my place to tell them what to do with their life. And chances are they'd do it anyways, at least my concious doesn't eat away with me at night. Also, sometimes homeless guys in my old town would walk around downtown selling roses or something and I always bought one if I had the money or made the guy I was with get me one. Haha, once my date bought all of them so he could give me a bouquet. Heh, he bargained with the guy though since he was buying them all and they clearly were from a bush!
Also, most of the homeless people I see now are in downtown Atlanta, so even if I am with someone, if it is night time/really bad part of town, I just try to mind my own business and continue on my way quickly. This comes from the paranoia of hearing about people getting robbed or having bricks thrown at them/their car.