print(*args) public

Writes the given object(s) to ios. Returns nil.

The stream must be opened for writing. Each given object that isn’t a string will be converted by calling its to_s method. When called without arguments, prints the contents of $_.

If the output field separator ($,) is not nil, it is inserted between objects. If the output record separator ($\) is not nil, it is appended to the output.

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

produces:

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