diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-06-08 06:49:44 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-06-08 06:49:44 +0000 |
commit | 9110e76b36e224434aaa853625844f3b1ad69ae1 (patch) | |
tree | aa41cea82fb729d04132cfb3024dcecd5036a6a6 /lib | |
parent | b835a92623d716e8b1e9f174f24d3a543416e3e7 (diff) | |
download | unicorn-9110e76b36e224434aaa853625844f3b1ad69ae1.tar.gz |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/unicorn/util.rb | 7 |
1 files changed, 1 insertions, 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 |