lib/vcardio/vcard.rb in vcardio-0.1.0 vs lib/vcardio/vcard.rb in vcardio-0.1.1

- old
+ new

@@ -43,10 +43,16 @@ abnf.join(separator) end alias_method :to_s, :to_abnf def to_file(path) - File.write(path, to_abnf) + file = File.new(path, 'w') + + file.write(to_abnf) + file.flush + file.close + + file end def ==(other) other.is_a?(VCardio::VCard) && other.properties == properties &&