1
0
Fork 0
mirror of https://github.com/nov/fb_graph2 synced 2023-03-27 23:22:15 -04:00

use :has_key? instead of :include? to differentiate String & Hash

This commit is contained in:
nov 2015-05-03 12:06:27 +09:00
parent 8bb5b0bee9
commit a157a40415

View file

@ -111,7 +111,7 @@ module FbGraph2
_response_ = _response_.with_indifferent_access if _response_.respond_to? :with_indifferent_access
case response.status
when 200...300
if _response_.respond_to?(:include?) && _response_.include?(:success)
if _response_.respond_to?(:has_key?) && _response_.has_key?(:success)
_response_[:success]
else
_response_