Skip to content

Commit

Permalink
Merge pull request #612 from r7kamura/feature/fix-reject
Browse files Browse the repository at this point in the history
Fix wrong usage of `Array#reject!`: this might return nil
  • Loading branch information
ryz310 committed May 13, 2022
2 parents a71c19d + b86b4a9 commit 8941886
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop_challenger/rubocop/todo_reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def all_rules
file_contents
.split(/\n{2,}/)
.map! { |content| Rule.new(content) }
.reject! { |rule| invalid?(rule) }
.reject { |rule| invalid?(rule) }
.sort!
end

Expand Down

0 comments on commit 8941886

Please sign in to comment.