lib/twitter/cursor.rb in twitter-5.8.0 vs lib/twitter/cursor.rb in twitter-5.9.0
- old
+ new
@@ -49,10 +49,10 @@
# @param attrs [Hash]
# @return [Hash]
def attrs=(attrs)
@attrs = attrs
- Array(attrs[@key]).each do |element|
+ @attrs.fetch(@key, []).each do |element|
@collection << (@klass ? @klass.new(element) : element)
end
@attrs
end
end