Permalink
Browse files

Fix for http://github.com/jnunemaker/twitter/issues/issue/29

Check to see if the object is an Array before calling .first on it
  • Loading branch information...
1 parent 683a25f commit b725b1b8a105fa3488783cef43b7db8b0dbb7c99 Ray Krueger committed Mar 29, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/twitter.rb
View
@@ -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)

0 comments on commit b725b1b

Please sign in to comment.