最佳答案
我是 Ruby 的新手,如果我有这样一个对象的话
{"apple" => "fruit", "carrot" => "vegetable"}
如何返回仅包含键的数组?
["apple", "carrot"]