lib/vfs/entries/file.rb in vfs-0.3.11 vs lib/vfs/entries/file.rb in vfs-0.3.12
- old
+ new
@@ -65,11 +65,11 @@
end
raise "can't do :override and :append at the same time!" if options[:override] and options[:append]
if block
fs.write_file(path, options[:append], &block)
else
- fs.write_file(path, options[:append]){|writer| writer.call data}
+ fs.write_file(path, options[:append]){|writer| writer.write data}
end
rescue StandardError => error
entry = self.entry
if entry.exist?
if options[:override]
@@ -160,10 +160,10 @@
else
raise "can't copy to unknown Entry!"
end
target.write options do |writer|
- read(options){|buff| writer.call buff}
+ read(options){|buff| writer.write buff}
end
target
end
def copy_to! to, options = {}
\ No newline at end of file