I’ve got two 2019 installs, one is ‘stock’ (ruby 2.5.5), and one is running Ruby 2.7. When 19.2 was released, I went through the process again, and also wrote a ps1 script to push the Ruby files into SU. From my perspective, doing so is a test of both SU and 2.7, but I’ve never had any issues.
I’ve only done this on Windows, so I don’t know what it would take on macOS, but I suspect the process would be similar.
Only two SU files need to be changed/edited, Sketchup.exe and LayOutRubyAPI.so. Both have a single reference to 'x64-msvcrt-ruby250.dll`, which needs to be changed to whatever Ruby version is being used. I continue to use both the ‘stock’ version and the new one, so they don’t seem to interfere with each other.
But, if one is wants to work with extension/compiled gems in both versions, that can get tricky, but it’s not impossible. One would need the equivalent of a pre-compiled gem, which I’m familiar with building. Or, as I’ve done, set SU to also have access to the RubyGems
--user-install folder, which is ‘versioned’
Doing this also gives one a ‘stand-alone’ version of Ruby 2.7.0 to use.
If anyone is interested, I can throw the ps1 file and a README on GitHub…
Note that one could also do this for Ruby 2.6 releases.
[disclaimer] The Ruby ‘daily build’ package is built three times a day in the cloud (Appveyor), and is used by several popular gems for CI testing. It is also used by some of the std-lib gems for testing. I am the owner of the GitHub repo that builds it.