Use the block form of `inreplace`:
```
inreplace 'lynis' do |s|
   s.gsub! a, b
   ...
end
```