Flowdock
coerce(other) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rational.rb, line 333
  def coerce(other)
    if other.kind_of?(Float)
      return other, self.to_f
    elsif other.kind_of?(Integer)
      return Rational.new!(other, 1), self
    else
      super
    end
  end
Register or log in to add new notes.