Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel/common/enumerator.rb
Original file line number Diff line number Diff line change
@@ -152,7 +152,9 @@ def size
@size.call
elsif @size
@size
else
# Lazy enums don't have a size and in case of Rbx can go into an infinite
# loop when using "count".
elsif !kind_of?(Enumerator::Lazy)
count
end
end

0 comments on commit 07a4c4b

Please sign in to comment.