title: Ruby Modulo Division
body: <p>So I made a program to do modulo division in Ruby, using a module:</p>
  
  <pre><code>module Moddiv
      def Moddiv.testfor(op1, op2)
          return op1 % op2
      end
  end
  </code></pre>
  
  <p>Program:</p>
  
  <pre><code>require 'mdivmod'
  print("Enter the first number: ")
  gets
  chomp
  firstnum = $_
  print("Enter the second number: ")
  gets
  chomp
  puts
  secondnum = $_
  puts "The remainder of 70/6 is " + Moddiv.testfor(firstnum,secondnum).to_s
  </code></pre>
  
  <p>When I run it with two numbers, say 70 and 6, I get 70 as the output! Why is this happening?</p>