公案に対して次の解決策を思いつきました。
# and
#   about_triangle_project_2.rb
#
def triangle(a, b, c)
   driehoek = Array.new[ a, b, c].sort
  raise (TriangleError), "length cannnot be 0 or lesser" if (driehoek[0] <= 0) 
  raise (TriangleError), "impossible triangle" if (driehoek[0] + driehoek[1] < driehoek[2])
 return :equilateral if ((a == b) and (b == c))
 return :isosceles if (((a == b) and (b != c)) or 
                   ((a != b) and (b == c)) or 
                   ((a == c) and (a != b)))
  return :scalene  if ((a !=b) and (b != c))
end
# Error class used in part 2.  No need to change this code.
class TriangleError < StandardError
end
しかし、三角形 [2,2,2] を使用すると、次のエラー メッセージが表示されます。
The answers you seek...
 wrong number of arguments (3 for 2)
Please meditate on the following code:
  ./triangle.rb:18:in `[]'
  ./triangle.rb:18:in `triangle'
ここで何が間違っているのか誰にも教えてもらえますか?
ロエロフ