Run ruby with the -w flag:

$ ruby -w -e 'class String; def length; end; end'
-e:1: warning: method redefined; discarding old length

I'm not sure if there's a way to make these warnings fatal.
-- 
Posted via http://www.ruby-forum.com/.