From 9110e76b36e224434aaa853625844f3b1ad69ae1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 8 Jun 2010 06:49:44 +0000 Subject: reopen_logs: no need to preserve encoding args Since we accidentally dropped open_args a while back, nothing seems to have broken :x So apparently MRI preserves it for us, and test/unit/test_util.rb agrees. --- lib/unicorn/util.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/unicorn/util.rb b/lib/unicorn/util.rb index 28f41e5..479dd00 100644 --- a/lib/unicorn/util.rb +++ b/lib/unicorn/util.rb @@ -54,12 +54,7 @@ module Unicorn rescue Errno::ENOENT end - open_arg = 'a' - if fp.respond_to?(:external_encoding) && enc = fp.external_encoding - open_arg << ":#{enc.to_s}" - enc = fp.internal_encoding and open_arg << ":#{enc.to_s}" - end - File.open(fp.path, 'ab') { |tmpfp| fp.reopen(tmpfp) } + File.open(fp.path, 'a') { |tmpfp| fp.reopen(tmpfp) } fp.sync = true new_st = fp.stat if orig_st.uid != new_st.uid || orig_st.gid != new_st.gid -- cgit v1.2.3-24-ge0c7