> Method Names | How they work > ------------------------------------------------------------ > #print | using the #to_s on each item within > | the presented 'string', and appends a > | 'space' character after the concatonated > | strings (and the space can get redirected > | to another character) - irb seemed to not > | put spaces, but I havent tested it with > | the actual ruby interpreter... I did test it with the interpreter. print does *not* put spaces by default. This is the behaviour I would expect. > ------------------------------------------------------------ > #puts | using the #to_s on each item within > | the presented 'string', and appents a new > | line character after the concatonated > | strings (perhaps the newline character > | can be redirected to another character > | as well??) It joins the strings via newlines. $ ruby -e 'puts "hello", "world"' hello world > ------------------------------------------------------------ > #to_s | calls the 'stringify method' which prints > | a pretty version of the string (such as > | a way to print arrays in a meaningful way > | to a human) This one is cool. class Foo def initialize @var = "bar" end def to_s "This is a customized string" end end var = Foo.new puts var Prints out: "This is a customized string"