Ruby 2.4.0 リファレンスマニュアル > ライブラリ一覧 > 組み込みライブラリ > NilClassクラス > to_h
to_h -> {}
{} を返します。
例 nil.to_h #=> {}
nil.to_h #=> {}