title: Problems with Modulo operator Ruby: Why am I getting "undefined method `%' for 1..100:Range"?
body: <p>For some reason I'm getting the error <code>undefined method '%' for 1..100:Range</code> when I run the following code:</p>
  
  <pre><code>[1..100].each do |x|
    if x % 3 == 0 &amp;&amp; x % 5 == 0
      puts "CracklePop"
    elsif x % 3 == 0
      puts "Crackle"
    elsif x % 5 == 0
      puts "Pop"
    else
      puts x
    end
  end
  </code></pre>
  
  <p>Any idea what's going on? Any help is much appreciated.</p>