Operation -- Annihilate! - S1-E30
Dr. McCoy: [In an aside to Kirk] Please don't tell Spock I said he was the best first officer in the fleet.
Spock: Why, thank you, Doctor McCoy.
Capt. Kirk: You were so concerned about his Vulcan eyes, Doctor, you forgot about his Vulcan ears.
Answer: Kirk was getting his physical and Dr. McCoy probably turned off communications, because if he hadn't, Kirk would have left and headed straight for the bridge, leaving McCoy irritated.