:key => "value"(hashrocket)和key: "value"(Ruby 1.9)符号之间有什么区别吗?
如果没有,那么我想使用key: "value"符号.有没有宝石可以帮助我转换:x =>为x:符号?
我有一个配方,其中包含以下代码,即lint测试失败:
service 'apache' do
supports :status => true, :restart => true, :reload => true
end
Run Code Online (Sandbox Code Playgroud)
它失败并出现错误:
Use the new Ruby 1.9 hash syntax.
supports :status => true, :restart => true, :reload => true
Run Code Online (Sandbox Code Playgroud)
不确定新语法是什么样的......有人可以帮忙吗?