Read this article by Daniel Berger first.

I just implemented his suggestions and made them available via RubyGems and our rug-b Rubyforge account. Have a look at the gems website and leave me a comment, if you like.

A simple gem install structured_warnings will bring it to your machine, another require 'structured_warnings' brings it to your project and tests.

The implementation relies heavily on Christian Neukirchen’s dynamic.rb.

Disclaimer: I cannot manipulate the rb_warn method, so all the “method redefined”, “void context” and “parenthesis” warnings will remain active.