Use Ruby protocol version to match directories.
Specs fail at Ruby 2.7.1 (https://salsa.debian.org/retro/rubygems-integration/-/jobs/793733), since it assumes some directory paths includes ruby version - 2.7.1, but they actually includes 2.7.0 which is ruby protocol version.