Skip to content

Commit

Permalink
Fix Enumerator.product.size.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcandre committed Mar 5, 2024
1 parent 83904f5 commit c60a451
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/backports/3.2.0/enumerator/product.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def size
@__enums.each do |enum|
return nil unless enum.respond_to?(:size)
size = enum.size
return size if size == nil || size == Float::INFINITY
return size if size == nil || size == Float::INFINITY || size == 0
return nil unless size.is_a?(Integer)
total_size *= size
end
Expand Down

0 comments on commit c60a451

Please sign in to comment.