At the brunch in the previous episode, Sheldon and Stuart discuss the fact that Sheldon doesn't swear. However, in this episode, Sheldon not only tells Leonard the Klingon word for dammit, he also uses it himself later.
Leonard says he doesn't know how to say "Dammit" in Klingon, however many times earlier in the series he has proven to be quite fluent in Klingon, so it's unlikely he doesn't know this word.