This is very old tradition - back from medieval times or even older. When Ukrainian guy wanted to marry a girl, he didn't buy her a ring and he didn't ask her somewhere in a romantic place, “Will you marry me?” No, he had to find two special people (from his relatives or friends) and he went with these people to the house of the girl or woman that he wanted to marry and a different method was used to ask her hand in marriage. Ukrainians call these two special people Starosty or Svaty. Starosty must be wise people and preferably with a good sense of humor because they will make a special speech to the parents of the future bride. Usually Starosty (Svaty) were chosen from men, and not very often from women.
So, Starosty and the potential fiancé came to the girl’s parents and gave a special speech. In the end of this speech they asked the parents to allow their daughter to be a wife of this young man. But the parents usually answered, “We need to ask the opinion of our daughter, to find out what does she thinks”. And the next event is very important! The girl stays silent, and if she wants to marry this man, she ties a ceremonial embroidered towel over the shoulder of each of the Starosty. She also ties a nice shawl on the hand of the young man. All these actions mean just one word, “Yes!”
But if it is “No”, then the Starosty get nothing and the young man receives a pumpkin from the girl! This is her way of saying she does not want to marry this man.
In the old days it was a shame for a Ukrainian man to get a pumpkin instead of a shawl. In the people’s opinion, he was not a very good boy if a girl didn't want to marry him, especially if he got more pumpkins from other girls.
Parents who had very pretty daughters needed to have a lot of pumpkins, because a pretty girl has many offers of marriage. So people were usually joking to the parents of the nice girl, “Oh, you need to grow a big garden of pumpkins!”
This Ukrainian tradition (to give a pumpkin to the loser guys) is almost gone in today’s times. So if a modern Ukrainian boy proposes marriage to a girl, he usually buys her a ring as is done in the rest of the world. But the saying “to get a pumpkin” is still very popular in Ukraine. This phrase usually means that somebody has said “no” to you in a very important business matter. Also, if Ukrainians say about some man, “He got a pumpkin from his girlfriend”, it means the same as it did several centuries ago. It means, “She didn't want to marry him”.
P.S. The Ukrainian name for pumpkin is harbuz.
Read also: Girl Like Guelder Rose, Ukrainians say