hanklords/flickraw

JSON.load should be JSON.parse I think

Closed this issue · 5 comments

Hi, I am getting this error when I load (require) flickraw.

/Library/Ruby/Gems/1.8/gems/flickraw-0.8/lib/flickraw.rb:166:in call:NoMethodError: private method load called for JSON:Module

I think on line 166 you should call JSON.parse and not JSON.load

Have you tried updating your json gem? I'm not seeing this issue, and I think load is the correct call to make here.

This issue occurs for me with the json 1.1.0 gem. I have just tried updating json but that blew up in my face with malloc errors incorrect checksum for freed object - object was probably modified after being freed.

Anyway, I checked the 1.1.0 and 1.2.0 implementations and there is a def load(source, proc = nil) method present in 1.2.0 which is not present (or called parse) in 1.1.0. I'm guessing the gemspec file should probably include a dependency on json >= 1.2.0?

You are not lucky, the method is present in JSON 1.1.1 :)
I will a upgrade the gemspec.

So it seems :)

Done : V0.8.1