From: cap Date: 2007-02-05T22:40:10+09:00 Subject: Re: not equal? "5".to_i+ "6".to_i and "5".to_i +"6".to_i On Feb 4, 10:12 pm, Eric Jacoboni wrote: > "cap" writes: > > ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-linux] > Thanks very much! I got it > >>> "5".to_i+ "6".to_i > > => 11 > > so, you're calling "5".to_i.+("6".to_i), ie. "5".to_i.+(6), > ie. 5.+(6), ie. 11 > > >>> "5".to_i +"6".to_i > > you're calling "5".to_i(+"6".to_i), ie. "5".to_i(6), > ie. "5" converted in base 6, ie 5 > > Rule of thumb : always put spaces around operators... > > --