当试图处理ruby中的嵌套哈希时,我收到了这个错误:
undefined method `has_key' for {"_l"=>{"or"=>"@`"}, "a"=>{}}:Hash (NoMethodError)
不是上面'for'引用的东西......哈希?不要哈希有has_key?()方法?这是怎么回事?
这是代码......谢谢:
$conditioning_environments = {
"_l" =>
{
"or" => "@`"
},
"a" => {
}
}
....
if $conditioning_environments["_"+graphemes[index+1]].has_key(g)
....