Green’s Dictionary of Slang

cucumber n.2

[resemblance]

the penis.

[Aus]Satirist & Sporting Chron. (Sydney) 4 Mar. 3/2: ‘The handsomest Flower,’ said at lady at the Floral Show [...] ‘is that ere Cauliflower.’ — The largest Cucumber, we understand, was that exhibited by the French Chevalier — ’twas a rum-un indeed.
[UK]‘Walter’ My Secret Life (1966) I 207: When you have satisfied your eye, your finger, and your cucumber, and seen blood on it, you may be sure you have had one [i.e. a virgin] — and not otherwise.
[[UK](con. WWII) B. Aldiss Soldier Erect 117: The terrible fellow has a weapon on him like a cucumber].
[[US]C. Bukowski Erections, Ejaculations etc. 73: My pulsating and giant sexual organ [..] it looked like I had a cucumber under there].
[UK]Indep. Rev. 13 June 7: Bury the Baldy Fella? Incarcerate the cucumber?