https://github.com/rubygems/rubygems/blob/451ac56078a3deaacef640906070d3d8f7502570/lib/rubygems/ext/builder.rb#L122-L138
Can we add /\.rb/ or something that matches scripts ending in .rb and just run them with the Ruby interpreter? The current behaviour is inflexible.