I've the feeling this case could be written just as:

```ruby
i = 1 if ln =~ /OS Name/
```