No. The code is really unclear, but I believe this is the equivalent:

```
list_of_extensions = MIME::Types[mimeType].first.extensions
extension = ".#{list_of_extensions.first}" if list_of_extensions
```