rails / marcel

Find the mime type of files, examining file, filename and declared type
Apache License 2.0
386 stars 67 forks source link

Don't require "pathname" stdlib to be loaded #15

Closed janko closed 5 years ago

janko commented 5 years ago

If the pathname standard library isn't required, then the Pathname constant will be missing. So we want to check first whether the constant exists before attempting to reference it, otherwise Marcel won't work properly without pathname being required.

janko commented 5 years ago

I would like to make Marcel a runtime dependency for Shrine, but this bug is getting in the way. Any chance of this PR getting merged?