lang/ruby26: fix build on 12
Use GCC9 only on head, ruby fails to build otherwise.
PR: 242630 Reported by: lfmorrison@gmail.com