From: Nando Sanchez Date: 2008-07-10T00:23:34+09:00 Subject: Re: class methods Clement: I think you have 2 different errors in your script: 1. The error already highlighted by other forum members. 2. You are creating a class named "Test" and a method for it, and later on you try to call this method inside an object that belongs to a totally different class (Date class). If you want to add the new method to the Date class you only need to write: class Date def toDDMMYYYY(sep) strftime("%d#{sep}%m#{sep}%Y") end end In this way the new method will be available in any date object. You need to modify your main code too: class MainLogic def show_date d = Date.today d.toDDMMYYYY("-") end end Rgd, Nando -- Posted via http://www.ruby-forum.com/.