title: Ruby "instance variable not initialized" warning
body: <p>In writing some "learning the language" code in ruby, as part of a linkedList implementation, I came across this warning:</p>
  
  <p>In the "add" method, the head is created if it doesn't already exist, i.e. </p>
  
  <pre><code>  def add(value)
     new_node=LinkedListNode.new(value)
     if !@head
       @head=new_node
     else
       self.find {|node| node.next ==nil }.next=new_node
     end
    end
  </code></pre>
  
  <p>I then get the warning</p>
  
  <pre><code>.../linked_list.rb:13: warning: instance variable @head not initialized
  </code></pre>
  
  <p>How do I get rid of this warning? What's the idiomatic way of doing this?</p>