Fred, (5/9) is integer division. The decimal part is truncated leaving
you
with 0. Use (5.0/9) instead.
Satish
Thanks! It works now
I cant believe such a small issue throw me off for so long.
Well, the good news is that you learned it early the hard way and won’t
forget it anytime soon. That will help you avoid such errors in more
complex code where they are more difficult to spot.
Thanks! It works now
I cant believe such a small issue throw me off for so long.
Was it more than two days?
If not, I think you’re ahead of the curve. The real question is how
long
it will take you to figure out why some similar expression is coming out
0 in three or four years.
-s
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.