Ruby calls the to_s method from the class of the object, not the String class parentheses are optional. (256.0).class # => Float (256.0).to_s # => "256.0"