diff --git a/src/iterator.cr b/src/iterator.cr index 45686cf8d112..179e5aac0493 100644 --- a/src/iterator.cr +++ b/src/iterator.cr @@ -590,7 +590,7 @@ module Iterator(T) # iter = ["a", "b", "c"].each # iter.each { |x| print x, " " } # Prints "a b c" # ``` - def each : Nil + def each(& : T -> _) : Nil while true value = self.next break if value.is_a?(Stop)