lib/tori/backend/filesystem.rb in tori-0.0.6 vs lib/tori/backend/filesystem.rb in tori-0.0.7

- old
+ new

@@ -9,9 +9,12 @@ def write(filename, resource) case resource when String ::File.open(path(filename), 'w'){ |f| f.write resource } + # see also https://bugs.ruby-lang.org/issues/11199 + when Pathname + ::IO.copy_stream resource.to_s, path(filename) else ::IO.copy_stream resource, path(filename) end end