It would depend enormously on the friend, the amount and the circumstances. I have both lent and given in the past and it's worth noting that ALL loans have been paid back. I'm happier about loaning money than books to be honest.
I think it's not just up to me anyway, some people would be very uncomfortable taking a gift and would very much prefer it to be a loan they can pay back, then it isn't charity and they don't feel patronised. Other folks that isn't always an option or the circumstances are such that they don't view it like that, so then a gift is more appropriate. I would rarely see it as just my decision to make, it takes to tango and to be a donor requires a donee,,,
Say members of my family all the time. It can be annoying. Sometimes when we go out, I feel like a charity case because everybody insists on paying. I too insist, but they are older than me and threaten to take offence.