I know this may seem like a really simple question, but it really bothers me that my puts keep generating “=> nil” and I scoured for an answer but could not find one. Thanks.
puts ‘blink ‘ *4
blink blink blink blink
=> nil
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Because that is the return value of
puts:source: http://www.ruby-doc.org/core-1.9.3/IO.html#method-i-puts
Also, I assume this is just in
irb? because callingputsdoesn’t display its return value in normal applications.