# File lib/ogginfo.rb, line 99 def close if tag != @original_tag convert_tag_charset(@charset, "utf-8") tempfile = Tempfile.new("ruby-ogginfo") begin File.open(@filename, "rb") do | input | replace_tags(input, tempfile, tag) end tempfile.close FileUtils.cp(tempfile.path, @filename) ensure tempfile.close! end end end