A metal M, on reacting with dilute acid, liberates a gaseous product. The same metal also liberates gas D when reacting with a base. What is gas D?

a) Oxygen (O2)
b) Hydrogen (H2)
c) Carbon dioxide (CO2)
d) Chlorine (Cl2)