Ruby mogilefs-client dev/users discussion/patches/bugs/help/...
 help / color / 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	[flat|nested] only message in thread

only message in thread, back to index

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

Ruby mogilefs-client dev/users discussion/patches/bugs/help/...

Archives are clonable:
	git clone --mirror https://yhbt.net/mogilefs-client-public
	git clone --mirror http://ou63pmih66umazou.onion/mogilefs-client-public

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.file-systems.mogilefs.ruby
	nntp://ou63pmih66umazou.onion/inbox.comp.file-systems.mogilefs.ruby

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git