From: Arslan Farooq Date: 2013-07-09T15:14:34+09:00 Subject: Well-Grounded Rubyist -- Person class implementation in chapter 4 question Hi, I am new to programming and new to Ruby. I have been studying Ruby using David Black's book, and I need bit of help with this: Code in listing 4.11, 4.12 and 4.13 needs to be pieced together (I think) to do something useful. However it's a bit confusing... whether they are meant to just studied as examples separately, or whether I am supposed to piece them together. Please have a look at the code: https://gist.github.com/arslanfarooq/54ac5aa7796385e4a063 If you could explain a bit what's going on in 4.13 that would be great. On my computer I have combined the code in one file "person_class.rb" and I am getting this error: person_class.rb:17:in `has_friends': undefined method `<<' for nil:NilClass (NoMethodError) from person_class.rb:43:in `
' -- Posted via http://www.ruby-forum.com/.