Carriage Return added during return of large string from class method

Addendum: Here is the immediate code around my problem:

  def getTestHeadMarkup()

    stdCallbacks = getFile(StdCallbacks,"No #{StdCallbacks} File found.")

    stdMassGlobs = getFile(StdMassGlobs,"No #{StdMassGlobs} File found.")
    stdMassGlobs = massageGlobals(stdMassGlobs)

    testMethods = getFile(TestMethods,"No #{TestMethods} File found.")
#fdoo = File.open("/tmp/dumpy002.lst","w")
#fdoo.print testMethods
#fdoo.close

    markup = "\n<script language='javascript'>\n" +
      stdMassGlobs +
      stdCallbacks +
      testMethods +
      "\n</script>\n" +
      "<title>#{@testType} Items Under Test: #{@setStr}</title>\n"

#fdoo = File.open("/tmp/dumpy003.lst","w")
#fdoo.print testMethods
#fdoo.close
    return markup
  end

  def putTestHeadMarkup()
    print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n"
    print "<html>\n"
    print "<head>\n"
    markup = getTestHeadMarkup()
#fdoo = File.open("/tmp/dumpy004.lst","w")
#fdoo.print markup
#fdoo.close
    print markup
#fdoo = File.open("/tmp/dumpy001.lst","w")
#fdoo.print markup
#fdoo.close
    print "</head>\n"
  end

···

-------
dumpy003.lst does not have the carriage returns. dumpy004.lst does, but the
carriage returns only occur in dumpy004 for the content originally in the
testMethods variable (and corresponding file).
x
xc