lib/puppet/util/diff.rb in puppet-2.7.18 vs lib/puppet/util/diff.rb in puppet-2.7.19

- old
+ new

@@ -1,5 +1,7 @@ +require 'tempfile' + # Provide a diff between two strings. module Puppet::Util::Diff include Puppet::Util require 'tempfile' @@ -62,10 +64,9 @@ # Handle the last remaining hunk output << oldhunk.diff(format) << "\n" end def string_file_diff(path, string) - require 'tempfile' tempfile = Tempfile.new("puppet-diffing") tempfile.open tempfile.print string tempfile.close notice "\n" + diff(path, tempfile.path)