From: Cee Joe Date: 2011-04-28T05:47:26+09:00 Subject: Re: Help me understand this SIMPLE Ruby code, using puts in a def I agree with Sam: >> def message >> "this is working" >> end => nil >> puts message.upcase THIS IS WORKING => nil >> def message1 >> puts "this is working" >> end => nil >> puts message1 this is working nil <----- extra nil => nil Since the nil is the last thing that is read in the method, upcase is called on that nil and upcase throws an error b/c you can't use that method on a nil. Make sense? -Cee -- Posted via http://www.ruby-forum.com/.