Done this a few times when helping out other riders who didn't have their own spare and it worked fine. Also accidentally put a spare 700c/27" tube in the tool bag of the 26" tired bike our daughter took to college. When she got a flat she gave me a call as to how it should be fixed. From her description I realized that I must have given her the wrong tube. But she got it installed and had no problems using the bike for a few more months until the end of the school year.