Method: Rational#to_r

Defined in:
rational.c

#to_rself

Returns self.

Rational(2).to_r      #=> (2/1)
Rational(-8, 6).to_r  #=> (-4/3)

Returns:

  • (self)


1595
1596
1597
1598
1599
# File 'rational.c', line 1595

static VALUE
nurat_to_r(VALUE self)
{
    return self;
}