From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.42.224.197 with SMTP id ip5cs181184icb; Mon, 21 Feb 2011 13:49:45 -0800 (PST) Received: by 10.52.158.202 with SMTP id ww10mr2775186vdb.95.1298324985062; Mon, 21 Feb 2011 13:49:45 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id k17si8271420vbr.1.2011.02.21.13.49.43; Mon, 21 Feb 2011 13:49:44 -0800 (PST) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id A4164185836B; Mon, 21 Feb 2011 16:49:43 -0500 (EST) Received: from mail-svr1.cs.utah.edu (mail-svr1.cs.utah.edu [155.98.64.241]) by rubyforge.org (Postfix) with ESMTP id 658471858267 for ; Mon, 21 Feb 2011 16:17:06 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail-svr1.cs.utah.edu (Postfix) with ESMTP id E4AE66500AE for ; Mon, 21 Feb 2011 14:17:22 -0700 (MST) X-Virus-Scanned: amavisd-new at cs.utah.edu Received: from mail-svr1.cs.utah.edu ([127.0.0.1]) by localhost (mail-svr1.cs.utah.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WIiY2mwMAhup for ; Mon, 21 Feb 2011 14:17:22 -0700 (MST) Received: from localhost (medusa.sci.utah.edu [155.98.20.24]) by smtps.cs.utah.edu (Postfix) with ESMTPSA id 883DB6500AC for ; Mon, 21 Feb 2011 14:17:22 -0700 (MST) From: Roni Choudhury To: sup-devel Date: Mon, 21 Feb 2011 14:17:04 -0700 Message-Id: <1298322910-sup-1012@medusa> User-Agent: Sup/git Subject: [sup-devel] [PATCH] eliminated nil-to-integer error when standard library ruby code calls make_tmpname with n=nil X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org I was getting an error from monkeypatched code that didn't seem to call into the standard library properly... this patch seemed to fix things for me, but I didn't fully understand what was going on here. roni --- lib/sup/message-chunks.rb | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb index c275f41..90137da 100644 --- a/lib/sup/message-chunks.rb +++ b/lib/sup/message-chunks.rb @@ -34,7 +34,11 @@ require 'tempfile' ## monkey-patch time: make temp files have the right extension class Tempfile def make_tmpname basename, n - sprintf '%d-%d-%s', $$, n, basename + if n == nil + sprintf '%d-nil-%s', $$, basename + else + sprintf '%d-%d-%s', $$, n, basename + end end end -- 1.7.3.2 _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel