about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/unicorn.rb7
-rw-r--r--lib/unicorn/util.rb1
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb
index a7b0646..9dcdc29 100644
--- a/lib/unicorn.rb
+++ b/lib/unicorn.rb
@@ -816,7 +816,12 @@ module Unicorn
     end
 
     def redirect_io(io, path)
-      File.open(path, 'ab') { |fp| io.reopen(fp) } if path
+      File.open(path, 'ab') do |fp|
+        io.reopen(fp)
+
+        # workaround for http://github.com/evanphx/rubinius/issues/360
+        io.instance_variable_set(:@path, path) if io.path.nil?
+      end if path
       io.sync = true
     end
 
diff --git a/lib/unicorn/util.rb b/lib/unicorn/util.rb
index 4e05864..e8c09d0 100644
--- a/lib/unicorn/util.rb
+++ b/lib/unicorn/util.rb
@@ -22,7 +22,6 @@ module Unicorn
 
         ! fp.closed? &&
           fp.sync &&
-          fp.path &&
           fp.path[0] == ?/ &&
           (fp.fcntl(Fcntl::F_GETFL) & append_flags) == append_flags
       end