Your method works, but isn't too sleek. One simpler solution is:
  def fac(num)
    return 1 if num.zero?
    1.upto(num).inject(:\*)
  end