由于ruby的弱类型特性,因此在开发过程中,一定注意。 例如: a = Hash.new a[1] = 1 如果使用a["1"], 即返回nil. 由于int 类型和 string类型的1是两个对象。因此,是两个不同的key.