Instead of duplicating the filter code, can you define the list once? E.g.

```ruby
all_source_files = file_accessor.source_files
source_files = all_source_files.reject { |sf| sf.extname == ".d" }
```

(Also note that we don’t do abbreviated var names like `regfiles`.)