Skip to content

Commit cb9ff12

Browse files
committed
simplify reject syntax
1 parent 714fc23 commit cb9ff12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/recommender.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Recommender
88
getter minor_count : Int32
99

1010
def initialize(scores)
11-
@scores = scores.values.reject { |score| score.is_a?(MissingScore) }
11+
@scores = scores.values.reject(MissingScore)
1212
@mostly_count = (@scores.size * 0.75).round.to_i
1313
@half_count = (@scores.size * 0.5).round.to_i
1414
@minor_count = (@scores.size * 0.25).round.to_i

0 commit comments

Comments
 (0)