# File lib/backports/1.9.2/complex.rb, line 2
  def to_r
    raise "Can't convert #{self} into Rational" unless imag.eql?(0)
    real.to_r
  end