概要
Object#nil? -> bool
詳細
レシーバが nil であれば真を返却。
サンプルコード
class Hoge def public_hoge; end protected def protected_hoge; end private def private_hoge; end end print Hoge.new.nil?.grep /hoge/
出力
$ ruby object_nil.rb nil.nil? # => true NIL.nil? # => true hoge.nil? # => true 'hoge'.nil? # => false ''.nil? # => false false.nil? # => false