Skip to content

Commit

Permalink
Update lib/backports/3.2.0/enumerator/product.rb
Browse files Browse the repository at this point in the history
Let's not go out of our way to return senseless results.
See ruby/spec#1140
  • Loading branch information
marcandre committed Mar 5, 2024
1 parent 3901db0 commit 4f5b6db
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 || size == -Float::INFINITY
return size if size == nil || size == Float::INFINITY
return nil unless size.kind_of?(Integer)
total_size *= size
end
Expand Down

0 comments on commit 4f5b6db

Please sign in to comment.