method
![Moderate documentation Importance_2](https://d2vfyqvduarcvs.cloudfront.net/images/importance_2.png?1349367920)
print(...)
public
Prints each object in turn to $stdout. If the output field separator ($,) is not nil, its contents will appear between each field. 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.
print "cat", [1,2,3], 99, "\n" $, = ", " $\ = "\n" print "cat", [1,2,3], 99
produces:
cat12399 cat, 1, 2, 3, 99
Register or
log in
to add new notes.
dennyabraham -
October 11, 2010
![Default_avatar_30](https://www.gravatar.com/avatar/7fcd2d3243650f8c22ea3612c27b0d20?size=30&default=http://apidock.com/images/default_avatar_30.png)
0 thanks
output is buffered and will not appear until flush
Output is buffered on most operating systems. To override this behavior, force the stdout or other io to sync
STDOUT.sync = true