www/gitlab-ce: make it working with ruby 3.1
Ruby 3.1 did some breaking changes:
https://www.ruby-lang.org/en/news/2021/12/25/ruby-3-1-0-released/
With the help of @yasu I added some work-arounds that should
make gitlab work again with ruby 3.1.
They can be removed after gitlab support ruby 3.1 upstream.
PR: 270252