We demonstrate a quadratic phase gate for one-way quantum computation in the continuous-variable regime. This canonical gate, together with phase-space displacements and Fourier rotations, completes the set of universal gates for realizing any single-mode Gaussian transformation such as arbitrary squeezing. As opposed to previous implementations of measurement-based squeezers, the current gate is fully controlled by the local oscillator phase of the homodyne detector. Verifying this controllability, we give an experimental demonstration of the principles of one-way quantum computation over continuous variables. Moreover, we can observe sub-shot-noise quadrature variances in the output states, confirming that nonclassical states are created through cluster computation.