Beretta, like most other mass producers of firearms, uses the cyanide method of colour case hardening. While perhaps not as attractive as bone charcoal hardening, it is a more durable finish. In most cases the manufacturer will also apply a coating over the finish to enhance longevity.
Colour case hardening has never been the longest lasting finish, but rust has not been a problem as far as I have seen. The best protection against rust is a highly polished surface finish. Perhaps Ruger's investment casting method leaves a micro pitted finish which is susceptible to rust, I don't know.
In any case, I have not seen rust as an issue with Beretta case coloured firearms, nor with CZ / Huglu or H&R guns which also use the cyanide method. Longevity of the colours seems to be of greater concern, although even after the colours are gone the case hardening remains.
Sharptail