> I try write Math.mod

You should use

  def self.mod


Like:

module Math
  def self.mod
    # add your code here
  end
end

-- 
Posted via http://www.ruby-forum.com/.