A rather unexpected error "NoMethodError: undefined method '-@' for ["some-text"]:Array" for a very simple piece of code:
t = []
times = 1
while times > 0 do
times--
case rand(16)+1
when 1 then t.push("human-like")
when 2 then t.push("amoeboid")
when 3 then t.push("beast")
when 4 then t.push("aerial")
when 5 then t.push("amphibian")
when 6 then t.push("bipedal")
when 7 then t.push("insectoid")
when 8 then t.push("radially symmetrical")
when 9 then t.push("multipedal")
when 10 then t.push("piscean")
when 11 then t.push("reptilian")
when 12 then t.push("humanoid")
when 13 then t.push("cetacean")
when 14 then t.push("botanic")
when 15 then t.push("non-organic")
else times += 2
end
end
Simply stating:
t = []
t.push("whatever")
...works as expected, but the part inside while loop fails miserably. I can't wrap my mind around why. Any clues? What I'm blind to?