From: Andy Lester Date: 2007-01-13T02:44:06+09:00 Subject: Re: DRY gsub... >> >> I wrote the following ruby statements.. I get the result I need , I >> tried to DRY it for 2 hours without being successfull , >> >> d = d.gsub(/\r\n/,' ') # get rid of carriage return >> d = d.gsub(/;/,' ') # replace column by space >> d = d.gsub(/,/,' ') # replace comma by space >> a = d.split(' ') # split into component , space as divider There's nothing in these four lines of code that violates the idea of DRY. There is no repeated code. Multiple calls to the same method are perfectly OK. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance