module ActiveSupport::Deprecation::Reporting

def silence(&block)

# => nil
end
ActiveSupport::Deprecation.warn('something broke!')
ActiveSupport::Deprecation.silence do

# => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)"
ActiveSupport::Deprecation.warn('something broke!')

Silence deprecation warnings within the block.
def silence(&block)
  @silenced_thread.bind(true, &block)
end