From: Heesob Park Date: 2009-03-25T18:46:34+09:00 Subject: Re: write a method to every possible class Hi, 2009/3/25, oguzaltu@gmail.com : > I have a function like this: > > def fun(ob) > return a_modified_version_of_ob > end > > Of course, if I have an object instance 'obis', I need to call it > like > fun(obis) > I want to be able to call like obis.fun > And I want to be able to do that all object types > Possible? > You can define fun method under Object class like this: class Object def fun # p self return a_modified_version_of_self end end Regards, Park Heesob