From 3ac6c9730fb6d4f7a1c50f44fe80b0bb2899f72a Mon Sep 17 00:00:00 2001 From: Pierre Graber Date: Wed, 28 Sep 2022 15:59:32 +0200 Subject: [PATCH] add rescue to avoid SystemStackError --- lib/helpers/hull.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/helpers/hull.rb b/lib/helpers/hull.rb index a59cb07..6658f61 100644 --- a/lib/helpers/hull.rb +++ b/lib/helpers/hull.rb @@ -23,6 +23,8 @@ module Hull def self.get_hull(vector) concave_hull(vector, 5) || convex_hull(vector) + rescue SystemStackError + convex_hull(vector) end # vector of unique points