Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix for when facebook returns 'true' as response

It gets parsed fine by JSON.parse('true') => true. Mash does not like
receiving that in constructor though, because it expects a hash.
  • Loading branch information...
commit 75febc8cfb3cb84330929b9e4743a412f4356d6f 1 parent 48e5f10
@mmozuras mmozuras authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/mini_fb.rb
View
1  lib/mini_fb.rb
@@ -684,6 +684,7 @@ def self.fetch(url, options={})
if res_hash.is_a? Array # fql return this
res_hash.collect! { |x| x.is_a?(Hash) ? Hashie::Mash.new(x) : x }
else
+ res_hash = { response: res_hash } unless res_hash.is_a? Hash
res_hash = Hashie::Mash.new(res_hash)
end
Please sign in to comment.
Something went wrong with that request. Please try again.