Structural and electronic properties of oligothiophene nano-wires and rings synthesized on a Au(111) surface are investigated by scanning tunneling microscopy. The spectroscopic data of the linear and cyclic oligomers show remarkable differences which, to a first approximation, can be accounted by considering electronic states confinement to one-dimensional (1D) boxes having respectively fixed and periodic boundary conditions. A more detailed analysis shows that polythiophene must be treated as a ribbon (i.e. having an effective width) rather than a purely 1D structure. A fascinating consequence is that the molecular nano-rings act as whispering gallery mode resonators for electrons, opening the way for new applications in quantum-electronics.