diff --git a/.travis.yml b/.travis.yml index 3064f09d..61018eef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: ruby rvm: + - 2.4 - 2.2 - 2.1 - 2.0 diff --git a/lib/instagram/response.rb b/lib/instagram/response.rb index 0d74b725..f767ba60 100644 --- a/lib/instagram/response.rb +++ b/lib/instagram/response.rb @@ -1,7 +1,11 @@ module Instagram module Response def self.create( response_hash, ratelimit_hash ) - data = response_hash.data.dup rescue response_hash + unless response_hash.data.nil? + data = response_hash.data.dup + else + data = response_hash + end data.extend( self ) data.instance_exec do %w{pagination meta}.each do |k|