Do not connect together the wire ends that used to feed the light (!)
That will cause a short circuit.
Use a separate wire nut for each wire end. You will probably need electrical tape to keep the wire nut from fallling off. Several layers of tape and no wire nut will work too.
I suggest leaving the wire there in case the next owner of the house wants to use it.