On Nov 20, 1:31 pm, Surjit Nameirakpam <surjit.mei... / gmail.com>
wrote:
> I am getting the truncate but the round off mentioned above doesn't work

As shown above, it certainly does work. (You are looking at the actual
output of typing code directly into irb and having Ruby evaluate it.)

I assume your code is slightly different. Perhaps if pared it down to
a test case that showed exactly your problem, we could help further.