I believe ruby followed c in the convention of integer/integer => integer
so you get 9/5 => 2

Another way of indicating float literals is by putting 9.0 / 5.0

dave

On 12/21/2012 11:08 PM, Derrick B. wrote:
> $ irb
> irb(main):001:0> -9 / 5
> => -2
> irb(main):002:0> -9.to_f / 5.to_f
> => -1.8
> irb(main):003:0> (-9.to_f / 5.to_f).to_i
> => -1
>
> If I want to assign the integer quotient of the above example, do I
> really need to go from float to integer?
>
> Thanks,
>