确定@hash[:key1][:key2]是否最简洁的方法是什么,如果@hash或@hash[:key1]为零,则不会抛出错误? 如果@hash[:key1]存在,则( defined?(@hash[:key1][:key2])返回True(它不确定:key2是否定义了:key2 )