Skip to content

Commit 7780213

Browse files
authored
Merge pull request #155 from coderdojo-japan/refactor
Refactoring for easy reading
2 parents ea7620f + 44e5212 commit 7780213

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/tasks/statistics.rake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ namespace :statistics do
2121

2222
loop.with_object([from]) { |_, list|
2323
nm = list.last.next_month
24-
nm > to ? (break list) : (list << nm)
24+
raise StopIteration if nm > to
25+
list << nm
2526
}.each { |date|
2627
Statistics::Aggregation.run(date: date)
2728
}

0 commit comments

Comments
 (0)