When I use the puts command, especially in IRB I get a nil returned as part of the statement execution.
I was curious to know what it means on a general note.
Please find below a sample:-
ruby-1.8.7-p334 :021 > puts 3/2
1
=> nil
Your inputs would be really handy.
Thanks.
Every method in Ruby returns a value.
putsdoesn’t really have any sort of useful value to return, so it returnsnil.