The Wisdom of Jesus the Son of Sirach, or Ecclesiasticus

Chapter 22
1Don’t talk much with a foolish man, and don’t go to one who has no understanding. Beware of him, lest you have trouble and be defiled in his onslaught. Turn away from him, and you will find rest, and you won’t be wearied in his madness.