print(...) public

Writes the given object(s) to ios. The stream must be opened for writing. If the output record separator ($\) is not nil, it will be appended to the output. If no arguments are given, prints $_. Objects that aren’t strings will be converted by calling their to_s method. With no argument, prints the contents of the variable $_. Returns nil.

   $stdout.print("This is ", 100, " percent.\n")

produces:

   This is 100 percent.
Show source
Register or log in to add new notes.