Originally reported downstream in Gentoo at https://bugs.gentoo.org/771744. WebKit allows overriding the Ruby version used for the build via RUBY_EXECUTABLE using a standard CMake mechanism and custom invocations use ${RUBY_EXECUTABLE} to ensure this is respected. The postprocess-asm rule is a bit different from some of the others, so it's been overlooked until now. It needs to use ${RUBY_EXECUTABLE} too, as postprocess-asm has a #!/usr/bin/env ruby shebang that will choose the first Ruby in path.
PR: https://github.com/WebKit/WebKit/pull/12358
Committed 262719@main (546b7119c8b7): <https://commits.webkit.org/262719@main> Reviewed commits have been landed. Closing PR #12358 and removing active labels.