"asking" - In this case this kind of language element is called gerund, right?
In high school my teacher firmly told us two verbs can never be together (25 years later I can still remember her angry face).
But I do see a lot of sentences like this, in some literature:
All he did was ask a question.
I am pretty sure my English teacher wouldn't be happy with this and would put a big "X" next to it. She told us you either convert the latter verb to an infinitive or a gerund, so it is either:
All he did was asking a question.
or:
All he did was to ask a question.
So is the first writing grammatically right? And if it is, is there any difference in meaning of the three sentences?