Method: NilClass#to_f

Defined in:
object.c

#to_f0.0

Always returns zero.

nil.to_f   #=> 0.0

Returns:

  • (0.0)
[View source]

1327
1328
1329
1330
1331
# File 'object.c', line 1327

static VALUE
nil_to_f(VALUE obj)
{
    return DBL2NUM(0.0);
}