Translation:The ice cream
It isn't the same word!
Ice cream = en glass, glassen and glassar, glassarna
A glass to drink from = ett glas, glaset and glas, glasen
Double consonants make a very big difference in Swedish – they mean that the vowel before is short and that the consonant sound is longer. There are lots of pairs like this in our language where meaning changes drastically.
glas /glɒːs/ has a long vowel, similar to the a in English father. The following consonant is short, just like it'd be in English.
glass /glasː/ has a short vowel, like the French/German/Spanish a. The following consonant is long, which means that it has a slightly prolonged duration compared to what an English speaker would expect.
My understanding is that there's no consistency, it's just one of those things you have to pick up as you go along. After 10 months of learning Swedish I've found that I've gotten quite good at remembering which is which, but I still have no mechanism of predicting if a new word I just learned will be an en-word vs. an ett-word.