We investigated the gain-switching properties of GaN-based ridge-waveguide lasers on free-standing GaN substrates with low-cost nanosecond current injection. It was observed that the output pulses with intense injection consisted of an isolated short pulse with a duration of around 50 ps at the high-energy side and a long steady-state component at the lower energy side independent of the electric pulse duration. The energy separation between the short pulse and steady-state component can be over 30 meV, favoring short-pulse generation with the spectral filtering technique. The duration of the steady-state component can be tuned freely by controlling the duration and voltage of the electric pulse, which is very useful for generating pulse-width-tunable optical pulses for various applications.