djberg96/ptools — pull request #2 by sgleadow (2014-02-25 09:28:02+00:00)
Title: Fix png image detection for ruby 2

Following on from the discussion on https://github.com/djberg96/ptools/issues/1 about binary detection, I've been trying to get `File.image?` working. I think the issue might be the default character encoding with Ruby 2.0.

I was testing with **ruby-2.0.0-p247**. Forcing the encoding like this feels a bit dirty, not sure of a better way though.