$$\text{R--C}\equiv\text{C}^-\text{Na}^+ + \text{R'--X} \xrightarrow{S_N2} \text{R--C}\equiv\text{C--R'} + \text{NaX}$$
Concept: Sodium alkynide acts as a powerful carbon nucleophile that attacks an alkyl halide via an $$S_N2$$ pathway to form higher internal alkynes.
Constraint: Successful strictly with primary ($$1^\circ$$) alkyl halides or methyl halides. With secondary ($$2^\circ$$) or tertiary ($$3^\circ$$) halides, the strongly basic alkynide causes $$E2$$ elimination, yielding alkenes instead of substitution products.