From: Eric Wong <e@80x24.org>
To: mogilefs-client-public@bogomips.org
Cc: Eric Wong <e@80x24.org>
Subject: [PATCH] test/test_fresh.rb: fix breakage from Ruby-trunk r50118
Date: Wed, 27 May 2015 21:59:18 +0000 [thread overview]
Message-ID: <1432763958-14922-1-git-send-email-e@80x24.org> (raw)
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
reply other threads:[~2015-05-27 21:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/mogilefs-client/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1432763958-14922-1-git-send-email-e@80x24.org \
--to=e@80x24.org \
--cc=mogilefs-client-public@bogomips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).