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