minimagick/minimagick — pull request #238 by kreynolds (2014-08-07 13:18:51+00:00)
Title: Treat image info keys as strings

Right now the image caching is broken. If you refer to image['width'], the info will be cached as :width and return nil. Additionally, subsequent requests will run identify again because it thinks its nil, save it again as a symbol, and still return nil. This patch casts it all to a string before it stores it so that it is accessible as a symbol or string. I chose a String instead of a Symbol as the key because it could lead to memory exhaustion otherwise. As a point of interest, the provided documentation mentions accessing keys by string, not hash, so the example itself was broken.