rails/rails — pull request #9523 by stopdropandrew (2013-03-03 00:21:47+00:00)
Title: ActiveSupport::Notifications::Instrumenter#instrument should yield

ActiveSupport::Notifications::Instrumenter#instrument should yield its payload the same way that ActiveSupport::Notifications does.

This allows you to cache the instrumenter (like in ActiveRecord's AbstractAdapter) but still yield the payload to the block.

This works:
```ruby
ActiveSupport::Notifications.instrument("pull") do |payload|
payload[:result] = "success"
end
```

But this doesn't:
```ruby
ActiveSupport::Notifications.instrumenter.instrument("pull") do |payload|
payload[:result] = "success"
end
```