Block off the flow of gas by turning the gas valve. Learn how to turn off a gas stove's gas supply from a professional handyman in this free video on home appliances.
The next thing we are going to do is turn off the gas supply to the stove. There usually is, this is like, I think, a 1/2" or 3/8" gas line, you might want to just replace this. This is a new one. So anyway, you would generally have a gas valve that looks something like this. When this valve is, right now it is off because this stove was leaking so I turned it off. So you definitely need to have a gas valve and turn off the gas. This would be in the "on" position indicating flow flowing through here, and in this, when you turn it sideways, showing that it's like blocking the flow, then it is shut off. And I can, just from turning that on those few seconds, I can smell the gas out of this stove. Now generally, just for your information, the gas itself is odorless, but the mercaptoethanol in the gas is what we smell.