From: Love U Ruby Date: 2013-02-16T19:40:57+09:00 Subject: Confusion with Ruby printing mechanics. Here I just played to see how printing statement behaves with "nil" values. Here we go: >> p nil nil => nil #good as expected. >> puts nil #as nil.to_s causes the "blank" in the first line. => nil #good as expected. >> p puts nil #as nil.to_s causes the "blank" in the first line nil => nil # good as expected, as p works here on the return value of puts. ========================= Confusion begins with the below : >> p(puts(print("hi"))) hi nil => nil # this is the actual output. But from the above analysis I expected the below: >> p(puts(print("hi"))) hi nil => nil Could you explain the gap between my assumption and the actual one? Thanks. -- Posted via http://www.ruby-forum.com/.