Method: NilClass#to_r

Defined in:
rational.c

#to_rObject

Returns zero as a Rational:

nil.to_r # => (0/1)


2119
2120
2121
2122
2123
# File 'rational.c', line 2119

static VALUE
nilclass_to_r(VALUE self)
{
    return rb_rational_new1(INT2FIX(0));
}