The best trick I’ve found is to check under the stem. If it’s green or just slightly brown and the fruit has a gentle give when squeezed, it should be fine. If it’s brown and feels very soft, it’s likely gone bad. If the stem doesn’t easily lift up or is a very pale color and feels firm, it needs to ripen further.