about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-05-27 21:33:03 +0000
committerEric Wong <e@80x24.org>2015-05-27 21:33:03 +0000
commit44dd54e3c3ae6a771baa17935ebe09ece1616026 (patch)
tree6e2b21c0203aaea9ffdf6bb81e2a31931eef6eb5
parent8ac33ad550d56702c0ee456615cce4478f1a7235 (diff)
downloadmogilefs-client-44dd54e3c3ae6a771baa17935ebe09ece1616026.tar.gz
IO.copy_stream behaves slightly differently when operating on
non-IO-subclassed objects nowadays.

Ref:
> * io.c (copy_stream_body): use the arguments without conversion if
>   having read, readpartial, and write methods, than conversion by
>   to_path method.  [ruby-core:68676] [Bug #11015]
-rw-r--r--test/test_fresh.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_fresh.rb b/test/test_fresh.rb
index f3d3df1..9499db5 100644
--- a/test/test_fresh.rb
+++ b/test/test_fresh.rb
@@ -138,7 +138,7 @@ class TestMogFresh < Test::Unit::TestCase
       if IO.respond_to?(:copy_stream)
         # ensure we match IO.copy_stream semantics
         dst = StringIO.new
-        IO.copy_stream(src, dst, *range)
+        IO.copy_stream(src.to_io, dst, *range)
         assert_equal dst.string, dst2.string
         assert_equal dst.string, client.get_file_data("key", nil, *range)
       end