From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: mogilefs-client-public@bogomips.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 3F2EA1F52D; Wed, 27 May 2015 21:59:21 +0000 (UTC) From: Eric Wong To: mogilefs-client-public@bogomips.org Cc: Eric Wong Subject: [PATCH] test/test_fresh.rb: fix breakage from Ruby-trunk r50118 Date: Wed, 27 May 2015 21:59:18 +0000 Message-Id: <1432763958-14922-1-git-send-email-e@80x24.org> List-Id: 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