Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Check to see if the object is an Array before calling .first on it
  • Loading branch information
Ray Krueger committed Mar 29, 2010
1 parent 683a25f commit b725b1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/twitter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def self.make_friendly(response)
raise_errors(response)
data = parse(response)
# Don't mash arrays of integers
if data && data.first.is_a?(Integer)
if data && data.is_a?(Array) && data.first.is_a?(Integer)
data
else
mash(data)
Expand Down

0 comments on commit b725b1b

Please sign in to comment.