Masterbating with other men is not gay, it is homoerotic. If you do it, you are getting aroused in a homosexual (homo means 1) environment. It is similar to people who get aroused by fear or other states of mind. So you might not be gay enough to have sex with men, but you are gay enough to get aroused by men.