Family Solanaceae (Tomato Family).
This plant is a taxonomic nightmare. Gray would identify it as Solanum nigrum, which he regarded as “a cosmopolite”; our Check List of the Vascular Flora of Allegheny County identifies it as Solanum americanum. Current botanists identify a whole Solanum nigrum group of similar species within the genus Solanum. The USDA PLANTS database identifies Solanum ptychanthum as the only one of that group that grows in our area, so we identify it thus.
The flowers are very similar to tomato flowers, but white instead of yellow. The leaves are pointed ovals, dark and a little glossy. The fruit is a black berry.
Like many members of the tomato family, this plant is poisonous, but there are cultivated varieties with edible fruit. The wild ripe berries are probably not poisonous, but it’s best to leave them alone. Unripe berries are definitely toxic.