From: Andy Dbest Date: 2008-06-09T00:25:08+09:00 Subject: Re: Search File Contents Stefano Crocco wrote: > On Sunday 08 June 2008, Andy Dbest wrote: > I've tried it and it works even without the assignment. Are you sure > there > isn't any trailing space afer 1. in the method argument? Using puts as I > suggested in my first post wouldn't have shown that. You can try > examining the > argument with p, instead of puts, which displays the string with special > characters escaped and surrounded by quotes. If everything is correct, > the > line > > p week_num > > should output > > "1." > > If there are trailing spaces, you'll see something like > > "1. " > > Stefano Thanks Stefano, the p week_num line did the trick, i noticed that there was a leading space. I was taking the input from an FXRuby text control, in which i introduced a space. Have fixed it now. Cheers and thanks. Andy -- Posted via http://www.ruby-forum.com/.