lib/under_os/file.rb in under-os-1.0.0 vs lib/under_os/file.rb in under-os-1.1.0
- old
+ new
@@ -67,10 +67,10 @@
def write(content)
if ! UnderOs::File.exists?(@path)
NSFileManager.defaultManager.createFileAtPath @path, contents:nil, attributes:nil
end
- content = content.dataUsingEncoding(NSUTF8StringEncoding) if content.is_a?(String)
+ content = content.to_data('utf-8') if content.is_a?(String)
open
@handle.writeData content
close
end