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: AS22989 208.118.235.0/24 X-Spam-Status: No, score=-2.3 required=3.0 tests=AWL,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: dtas-all@80x24.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 83BB92014E for ; Mon, 13 Apr 2015 01:04:36 +0000 (UTC) Received: from localhost ([::1]:46658 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhSnj-0005CU-Rb for dtas-all@80x24.org; Sun, 12 Apr 2015 21:04:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhSnh-0005Br-5m for dtas-all@nongnu.org; Sun, 12 Apr 2015 21:04:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YhSne-0002xV-Ib for dtas-all@nongnu.org; Sun, 12 Apr 2015 21:04:33 -0400 Received: from dcvr.yhbt.net ([64.71.152.64]:36049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhSne-0002xR-DH for dtas-all@nongnu.org; Sun, 12 Apr 2015 21:04:30 -0400 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 0701E200E5 for ; Mon, 13 Apr 2015 01:04:28 +0000 (UTC) From: Eric Wong To: Subject: [PATCH 1/3] xs: allow taking a string as input Date: Mon, 13 Apr 2015 01:04:22 +0000 Message-Id: <1428887064-18715-2-git-send-email-e@80x24.org> In-Reply-To: <1428887064-18715-1-git-send-email-e@80x24.org> References: <1428887064-18715-1-git-send-email-e@80x24.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.71.152.64 X-BeenThere: dtas-all@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dtas-all-bounces+dtas-all=80x24.org@nongnu.org Sender: dtas-all-bounces+dtas-all=80x24.org@nongnu.org This allows us to avoid unnecessary Array conversions in call sites --- lib/dtas/xs.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dtas/xs.rb b/lib/dtas/xs.rb index 04ac252..7b3a0c2 100644 --- a/lib/dtas/xs.rb +++ b/lib/dtas/xs.rb @@ -9,6 +9,6 @@ require 'shellwords' # again, filesystems can use any byte value in names except '\0'. module DTAS::XS # :nodoc: def xs(ary) - Shellwords.join(ary.map(&:b)) + Shellwords.join(Array(ary).map(&:b)) end end -- EW