Rating the quality of a response based on the number of typos
What happens when @typos.percent_of(@word_length) is exactly 30?  You need to fill in the gaps.  The last case should be an else rather than an elsif, to ensure that all cases are covered.

Is it guaranteed that response_quality will be 1, 2, or 3?  If it's not obvious from context, then there should be an explanatory comment that other values are or aren't possible.

The solution below would reduce the code a bit, but it's not necessarily better than your original approach, which did have the advantage of regularity in the pattern.

def rating
  if @typos.zero?
    case response_quality
    when 1; return 5
    when 2; return 4
    when 3; return 3
    end
  end

  typo_pct = @typos.percent_of(@word_length)
  typo_pct &lt; 20 ? 2 :
  typo_pct &lt; 30 ? 1 :
                  0
end