 <p>Your <code>print_values</code> method is an <em>instance</em> method, though it does not use the instance in it.</p> <p>I believe you meant to use the instance data for your implementation:</p> <pre><code>class LinkedListNode attr_accessor :value, :next_node def initialize(value, next_node = nil) @value = value @next_node = next_node end def print_values print "#{value} --&gt; " if next_node.nil? print "nil" return else next_node.print_values end end end node1 = LinkedListNode.new(37) node2 = LinkedListNode.new(99, node1) node3 = LinkedListNode.new(12, node2) node3.print_values </code></pre> <p>Another option is to make the method a <em>static</em> method, which does not need an instance, which will look like:</p> <pre><code>class LinkedListNode attr_accessor :value, :next_node def initialize(value, next_node = nil) @value = value @next_node = next_node end def self.print_values(list_node) print "#{list_node.value} --&gt; " if list_node.next_node.nil? print "nil" return else print_values(list_node.next_node) end end end node1 = LinkedListNode.new(37) node2 = LinkedListNode.new(99, node1) node3 = LinkedListNode.new(12, node2) LinkedListNode.print_values(node3) </code></pre> <p>Both options will be considered <em>recursive</em>, since the method calls itself. There are no rules about recursion (calling another method is allowed), but there are things you need to be aware of, like if you don't have a good <em>stopping condition</em>, your method might "explode" with a stack overflow exception.</p>