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