has_key?已经弃用 请使用key?
vagrant@precise64:~/data$ pry
[1] pry(main)> {a: 1}.key?(:a)
=> true
[2] pry(main)> {a: 1}.key?(:b)
=> false
[3] pry(main)> {a: 1,b: {c: 1}}.key?(:b)
=> true
[4] pry(main)> {a: 1,b: {c: 1}}.key?(:c)
=> false
[5] pry(main)> {a: 1,b: {c: 1}}.has_key?(:c)
=> false