1 Posts Tagged 'nil'
NilClass
Here's a reason to love Ruby. In Ruby, nil is the value an unintialized variable gets. Similar to undef in Perl. In Ruby though, everything is an object. nil is an object too, of class NilClass. This lets us do strange and wonderful things, for example when referencing multi-dimensional arrays.
1
