Shopify/statsd-instrument — pull request #17 by langalex (2012-07-05 15:17:21+00:00)
Title: Adds passing blocks to instrumented methods

Before when I instrumented a method that expected a block, e.g.

class User
extend StatsD::Instrument

def update(&block)
yield self
end

statsd_measure :update, 'User.update'
end

and I would call `User.new.update {|u| u.email = 'xyz'}` the block would not get passes to the method.

This patch fixes it for all four methods (`measure`, `count`, `count_if`, `count_success`).