Last Updated: February 25, 2016
·
423
· yaodong

p, puts and print in Ruby

p obj calls obj.inspect and appends a new line to output.

put obj calls obj.to_s and appends a new line to output.

print obj calls obj.to_s but does not appends a new line to output.