From: Robert Dober Date: 2006-04-14T22:54:00+09:00 Subject: Re: Strange Integer() behavior ------=_Part_28020_11082950.1145022836752 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 4/14/06, Robert Klemme wrote: > > 2006/4/14, Patrick Joyce : > > Thank you both for the quick answer. > > > > In hindsight, the issue is so obvious, I'm almost sorry for wasting you= r > > time. Guess the brain was fried after 9-5 coding at the day job and 8P= M > > - 3 AM on my own thing. > > > > I guess the project for tomorow is to figure out where that "039" is > > coming from in the Mechanize parser. > > Well, if you want to use Integer then the obvious fix is to do str.sub/^0= +/, '' > > > Thanks again for the quick response I don't think I would have been abl= e > > to go to sleep otherwise. > > :-) > > Cheers > > robert > > -- > Have a look: http://www.flickr.com/photos/fussel-foto/ > > Ruby can do better Integer("08") or Integer("038") bomb "08".to_i + "038".to_i =3D> 46 Cheers Robert -- Deux choses sont infinies : l'univers et la b=EAtise humaine ; en ce qui concerne l'univers, je n'en ai pas acquis la certitude absolue. - Albert Einstein ------=_Part_28020_11082950.1145022836752--