jellybob/chef-gelf — pull request #2 by philk (2011-12-14 20:01:14+00:00)
Title: gelf: Fix sanitised_changes method

The current method (having an #each inside #reject) was causing it to always
reject everything since #each returns the original object. This was the
simplest way I could come up with while keeping the original
functionality. It's probably wrong but hopefully it helps someone do it right.

This is the behavior I'm seeing on 1.8.7p249 (Ubuntu) and 1.9.3 (OSX):

```ruby
[1,2,3].reject { |a| {}.each { |k,v| true } }
=> []
[1,2,3].reject { |a| {}.each { |k,v| false } }
=> []
[1,2,3].reject { |a| {} }
=> []
[1,2,3].reject { |a| true }
=> []
[1,2,3].reject { |a| false }
=> [1, 2, 3]
```