Andre Willik valenti wrote:
> class Fixnum
>   # You can, but please don't do this
>   def +( other )
>     self - other
>   end
> end

Which bit of "please don't do this" don't you understand? :-)

irb is itself a large and quite complex ruby program; look in 
/usr/lib/ruby/1.8/irb/* or the equivalent on your system.

If you break basic methods like addition, then it will fail. The same 
would apply to pretty much any other ruby program.

It is, however, a good demonstration of why polluting core classes is a 
really bad idea (because other people's code will depend on them 
behaving in the usual way, and you can't isolate those changes so they 
only affect your code)
-- 
Posted via http://www.ruby-forum.com/.