Boyle's law and gravitational instability