Ruby mogilefs-client dev/users discussion/patches/bugs/help/...
 help / color / mirror / code / Atom feed
* [PATCH] test/test_fresh.rb: fix breakage from Ruby-trunk r50118
@ 2015-05-27 21:59 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-05-27 21:59 UTC (permalink / raw)
  To: mogilefs-client-public; +Cc: Eric Wong

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]
---
 test/test_fresh.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 @@ def test_get_file_data_range
       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
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-27 21:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-27 21:59 [PATCH] test/test_fresh.rb: fix breakage from Ruby-trunk r50118 Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/mogilefs-client.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).