Things that may inspire me to hunt and kill you

Posted by Piers Cawley on Feb 2, 2009

Let’s say you’re writing a ruby library. Something you want and expect others to use. Here’s how to reduce those others to incandescent rage:

require ‘rexml’

include REXML

module MyShinyModule … end

No. Not no how. Not never. You just crapped in my namespace and stomped on who knows how many of my own classes. Now, include is a fine and dandy thing, and it certainly has its uses, but using it at the top level of your library files is not one of them.


Can anyone guess which library has been wasting my morning?