See `Collection#validate_index_types`:
https://github.com/brandonblack/mongo-ruby-driver/blob/db11b1974a1080cb45be5bd09fb6c29e8ea603ab/lib/mongo/collection.rb#L1036-L1044

That error message is now no longer hard-coded with these values and you only have to update them here.