summaryrefslogtreecommitdiff
path: root/lib/chef/shell/ext.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/shell/ext.rb')
-rw-r--r--lib/chef/shell/ext.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/shell/ext.rb b/lib/chef/shell/ext.rb
index 843126b4f2..c1210e52a6 100644
--- a/lib/chef/shell/ext.rb
+++ b/lib/chef/shell/ext.rb
@@ -329,13 +329,13 @@ module Shell
filename += object.id
end
- edited_data = Tempfile.open([filename, ".js"]) do |tempfile|
+ edited_data = Tempfile.open([filename, ".js"]) { |tempfile|
tempfile.sync = true
tempfile.puts Chef::JSONCompat.to_json(object)
system("#{Shell.editor} #{tempfile.path}")
tempfile.rewind
tempfile.read
- end
+ }
Chef::JSONCompat.from_json(edited_data)
end