From: Rik Hemsley Date: 2001-11-06T05:05:42+09:00 Subject: [ruby-talk:24420] Re: Help with OO #if Vincent Foley > puts l33t(x) > > [/code] > > look at the last line, how would I do to do 'puts x.l33t'? Ruby lets you extend existing classes at runtime. class String def l33t s = self s.tr!('eE', '3') s.tr!('aA', '4') s.tr!('lL', '1') s.tr!('oO', '0') s.tr!('tT', '7') s.tr!('sS', '$5') s end end p "Hello, world!".l33t rik@without ~ > ruby test.rb "H3110, w0r1d!" HTH, Rik