nil (NilClassのインスタンス) にもいくつかメソッドが定義されている。
以下、リファレンスマニュアルからコピペ:
self & other常に false を返します。
self | otherself ^ otherother が真なら true を偽なら false を返します。
nil?常に true を返します。
to_a空の配列[]を返します。
to_f ((<ruby 1.7 feature>))0.0 を返します。
to_i0 を返します。
to_s空文字列""を返します。