The Parting of the Ways
According to Steven Moffat, the squareness gun used by Professor River Song to help the party escape from the impending Vashta Nerada at the beginning of the episode is intended to be the same sonic blaster that was used by Jack Harkness in the episode "The Doctor Dances". Moffat suggests that it was left in the TARDIS after "The Parting of the Ways", and taken by River Song in the Doctor's future. The name "squareness gun" was coined by Rose Tyler in the earlier episode.