diff options
author | Xabier de Zuazo <xabier@onddo.com> | 2014-05-27 21:25:29 +0200 |
---|---|---|
committer | Xabier de Zuazo <xabier@onddo.com> | 2014-05-27 21:25:29 +0200 |
commit | cc2d0f4b9bca39d115a059e79d04c7e540bedf65 (patch) | |
tree | 685c0e21b809a8783f4e5ceda3f61f7bef684114 /lib/chef/user.rb | |
parent | adfa511fdb998c9774aaaabde9e86ffac10f436d (diff) | |
download | chef-cc2d0f4b9bca39d115a059e79d04c7e540bedf65.tar.gz |
[CHEF-5328] User#load(inflate=true) use Hash#inject instead of Hash[]
Diffstat (limited to 'lib/chef/user.rb')
-rw-r--r-- | lib/chef/user.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/chef/user.rb b/lib/chef/user.rb index b8ec91b7ee..e2ef45dc5c 100644 --- a/lib/chef/user.rb +++ b/lib/chef/user.rb @@ -151,9 +151,10 @@ class Chef response # OSC end if inflate - Hash[users.map do |name, url| - [name, Chef::User.load(name)] - end] + users.inject({}) do |user_map, (name, _url)| + user_map[name] = Chef::User.load(name) + user_map + end else users end |