It looks like StringIO#puts prints a newline after every string argument given, but it does not handle the case where #puts is called without any arguments. MRI prints a newline in this case.
string_io = StringIO.new
string_io.puts
# Will not pass currently
assert(string_io.string == "\n")
For the time being, I can work around it by passing an empty string, e.g. #puts("")
It looks like
StringIO#puts
prints a newline after every string argument given, but it does not handle the case where#puts
is called without any arguments. MRI prints a newline in this case.For the time being, I can work around it by passing an empty string, e.g.
#puts("")