title: Ruby, returning the nth triangular number and returning 0 for out of range values
body: <p>I'm currently doing some Code Wars training and am having trouble with the nth triangular test.</p>
  
  <p>Here is the question:</p>
  
  <p>You need to return the nth triangular number. You should return 0 for out of range values, but you will always be passed a number.</p>
  
  <p>Here is my current code when n is being passed with only the values of 1, 2, and 3 (which is all that is needed to pass the test).</p>
  
  <pre><code># Return the nth triangular number
  def triangular( n )
   n * (n + 1) / 2
  end
  </code></pre>
  
  <p>I continue to get a most of the tests passed, except I get an error:</p>
  
  <pre><code>Expected: 0; instead got: 10
  </code></pre>
  
  <p>If someone could kindly explain what this is even asking that would be great, can't seem to find any material online that explains this problem.</p>