From 5f7f02420d2df6a29115dc9dcf31587290d0658f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 8 Nov 2011 10:09:27 +0000 Subject: copy_stream (1.8) fix close issue Not sure exactly what was causing it... --- lib/mogilefs/copy_stream.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mogilefs/copy_stream.rb b/lib/mogilefs/copy_stream.rb index 7531f54..9397e89 100644 --- a/lib/mogilefs/copy_stream.rb +++ b/lib/mogilefs/copy_stream.rb @@ -22,7 +22,7 @@ module MogileFS::CopyStream # :nodoc: dst_io.flush if dst_io.respond_to?(:flush) written ensure - src_io.close if src_io != src - dst_io.close if dst_io != dst + src_io.close if src.respond_to?(:to_str) + dst_io.close if dst.respond_to?(:to_str) end end -- cgit v1.2.3-24-ge0c7