Green’s Dictionary of Slang

ram and dam n.

also ram and damn, ram-and-dam gun
[one rams in the charge and damns the target]

a muzzle-loading gun.

[UK]Cornhill Mag. Sept. 342: Old sportsmen...who still use and prefer the old ‘ram and d-n’ which they wielded so effectively in their youth .
Pall Mall Mag. Jan. 116: A pot-hunter [...] considering the condition of his ancient ram-and-dam gun .