lib/gitlab/paginated_response.rb in gitlab-4.16.1 vs lib/gitlab/paginated_response.rb in gitlab-4.17.0

- old
+ new

@@ -41,20 +41,20 @@ yield current end end def lazy_paginate - to_enum(:each_page).lazy.flat_map(&:to_ary) + to_enum(:each_page).lazy.flat_map(&:to_ary) # rubocop:disable Lint/ToEnumArguments end def auto_paginate(&block) - return lazy_paginate.to_a unless block_given? + return lazy_paginate.to_a unless block lazy_paginate.each(&block) end def paginate_with_limit(limit, &block) - return lazy_paginate.take(limit).to_a unless block_given? + return lazy_paginate.take(limit).to_a unless block lazy_paginate.take(limit).each(&block) end def last_page?