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: AS8972 188.138.9.0/24 X-Spam-Status: No, score=-2.0 required=3.0 tests=AWL,BAYES_00,RCVD_IN_XBL shortcircuit=no autolearn=no version=3.3.2 X-Original-To: rainbows-public@bogomips.org Received: from 80x24.org (atlantic480.us.unmetered.com [188.138.9.49]) by dcvr.yhbt.net (Postfix) with ESMTP id A0CF41F6D6 for ; Mon, 14 Sep 2015 05:33:33 +0000 (UTC) From: Eric Wong To: rainbows-public@bogomips.org Subject: [PATCH 2/6] response: avoid unnecessary args to IO.copy_stream Date: Mon, 14 Sep 2015 05:33:14 +0000 Message-Id: <20150914053318.12251-3-e@80x24.org> In-Reply-To: <20150914053318.12251-1-e@80x24.org> References: <20150914053318.12251-1-e@80x24.org> List-Id: Not all responses are seekable, so do not attempt to pass seek arguments to them since Ruby may attempt to seek (and fail!). --- lib/rainbows/response.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rainbows/response.rb b/lib/rainbows/response.rb index 8a0daf8..8d0de1d 100644 --- a/lib/rainbows/response.rb +++ b/lib/rainbows/response.rb @@ -129,7 +129,7 @@ module Rainbows::Response module CopyStream def write_body_file(body, range) range ? COPY_STREAM.copy_stream(body, self, range[1], range[0]) : - COPY_STREAM.copy_stream(body, self, nil, 0) + COPY_STREAM.copy_stream(body, self) end end include CopyStream -- EW