On Thu, 19 Apr 2001, Robert Najlis wrote: > Am I doing something wrong (maybe - I am pretty new to Ruby)? it seems > that many time when I want to geet a numerical value out of a variable, > I need to make it a String first, and then use the .to_i function -> > "#{count}".to_i > this can't be right, can it? > I would give a better example, but the server with my code on it is > having issues (thus my having time to post this...) if count.class == String, then you don't need to do "#{count}", you can write just count directly next to .to_i : count.to_i but if count.class == Integer, then you don't need to do anything, just: count though calling to_i on an Integer is harmless (does nothing). matju