lib/semmy/files.rb in semmy-0.3.0 vs lib/semmy/files.rb in semmy-0.4.0

- old
+ new

@@ -2,12 +2,13 @@ module Files module_function def rewrite(path, update) content = File.binread(path) + updated_content = update.call(content) File.open(path, 'wb') do |file| - file.write(update.call(content)) + file.write(updated_content) end end def rewrite_all(glob, update) Dir.glob(glob) do |path|