The one use case mentioned in that ticket was for a cookbook that wanted to [search once, then replace or append if the line was found or not, respectively](https://github.com/3ofcoins/chef-cookbook-hostname/blob/40e73eabffecd59a47250db05ad15f0d55930383/recipes/default.rb#L50-L53). (That cookbook hasn't used `FileEdit` since [Apr 25, 2013](http://community.opscode.com/cookbooks/hostname).)

Seems like a plausible feature. It can be accomplished now, but results in two full scans of the content:

```ruby
hosts = Chef::Util::FileEdit.new("/etc/hosts")
hosts.search_file_replace_line(/^#{node[:ipaddress]}/, hosts_line)
hosts.insert_line_if_no_match(hosts_line) unless hosts.unwritten_changes?
```

We could describe the existing return values of these methods, and make it a little shorter:

```ruby
hosts.search_file_replace_line(/^#{node[:ipaddress]}/, hosts_line) or
  hosts.insert_line_if_no_match(hosts_line)
```