I glanced at rbinstall.rb briefly; for those interested, the link should be here:
https://github.com/ruby/ruby/blob/master/tool/rbinstall.rb
That seems quite old code, lots of global variables in it as well. Props to
everyone able to improve on it. My best bet is that it was written a long
time ago. :-)
(I wondered if we could actually put all the .rb files that remain as part
of the ruby tarball into its own gem, but I am not sure if the effort may
be worth it. So props to you and everyone else who improves on old code!)