lib/hanami/assets/compiler.rb in hanami-assets-1.3.3 vs lib/hanami/assets/compiler.rb in hanami-assets-1.3.4

- old
+ new

@@ -229,11 +229,11 @@ end # @since 0.1.0 # @api private def copy! - write { source.read } + write { source.binread } end # @since 0.1.0 # @api private def cache! @@ -242,10 +242,10 @@ # @since 0.1.0 # @api private def write destination.dirname.mkpath - destination.open(File::WRONLY | File::TRUNC | File::CREAT, DEFAULT_PERMISSIONS) do |file| + destination.open(File::WRONLY | File::TRUNC | File::CREAT | File::BINARY, DEFAULT_PERMISSIONS) do |file| file.write(yield) end end # @since 0.1.0