> >> "5".to_i+ "6".to_i
> => 11
> >> "5".to_i +"6".to_i
> => 5

The second case +"6".to_i is treated as an argument for to_i method.
This will make it more obvious:
>> "111".to_i +"2".to_i
=> 7

"111".to_i +"2".to_i  is equivalent to "111".to_i(2), hence the result.


Regards,
Rimantas
--
http://rimantas.com/