-- ultipart_Boundary_x2a0b0671b795ce2f30e2e944912426f3x
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
> It's an implementation detail.
> I don't think it should be a part of the spec.
Somewhat contrived, but still a surprise to me:
class A
def to_s; "Hello"; end
def to_ary; ["Goodbye"]; end
end
puts sprintf("%s", A.new) # t; Hello
puts "%s" % A.new # t; Goodbye
On Ruby 1.8.6-p111, this prints "Hello" two times instead.
Lars
-- ultipart_Boundary_x2a0b0671b795ce2f30e2e944912426f3x--