A quite different way to solve it, popped into my twisted little mind:
[:equilateral, :isosceles, :scalene][[a,b,c].uniq.length - 1]
As I wrote to him, "Do NOT put something that "clever" in anything actually important, as the lack of clarity isn't worth the conciseness. But it makes a neat
little mind-exercise. ;-)"
Alternately, to split it up for a bit better readability:
types = [:equilateral, :isosceles, :scalene]
number_of_lengths = [a, b, c].uniq.length - 1
types[number_of_lengths]
Just thought y'all might find it amusing....