What is the meaning of [Make an ass of yourself]

To behave absurdly.

This expression is first found in Shakespeare’s A Midsummer Night’s Dream, 1600, in which the weaver Nick Bottom has his head magically transformed into that if a donkey by the fairy Puck:

Make an ass of yourselfThis is to make an asse of mee, to fright me, if they could.

An example in print that includes the currently common ‘yourself’ appears as late as the 19th century, in the novel by Anthony Trollope, The Belton Estate, 1866:

‘I shall never marry.’

‘Nonsense, Will. Don’t make such an ass of yourself as to suppose that you’ll not get over such a thing as this.