Preventing Division by Zero
Well to me the bad thing is that the function produces an unexpected behavior.

You try to divide by 0, it divides by 1. Huh?

What I would do is throw an Argument Error Exception (or what ever other exception that you think is appropriate).

def calc_percentage(numerator, denominator)
  if denominator.to_f.nonzero
      then (numerator/ denominator.to_f) * 100
      else raise ArgumentError, "Denominator can not be 0.", caller
  end     
end 


This way it produces something that is logic and consistent.