Added auto-closing

Hi! It's my first pull request, please be gentle with me... :-)
You're right... Still practising ruby...