From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.213.28.69 with SMTP id l5cs96723ebc; Mon, 25 Jan 2010 08:56:51 -0800 (PST) Received: by 10.224.15.206 with SMTP id l14mr4287075qaa.117.1264438610601; Mon, 25 Jan 2010 08:56:50 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 4si18538216qwe.5.2010.01.25.08.56.50; Mon, 25 Jan 2010 08:56:50 -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 03BFB3C8047; Mon, 25 Jan 2010 11:56:50 -0500 (EST) Received: from www.cquest.utoronto.ca (www.cquest.utoronto.ca [192.82.128.5]) by rubyforge.org (Postfix) with ESMTP id 3F02B3C8042 for ; Mon, 25 Jan 2010 11:56:48 -0500 (EST) Received: from ntdws12.chass.utoronto.ca ([128.100.160.253]:46731 ident=93) by www.cquest.utoronto.ca with esmtp (Exim 4.43) id 1NZSF6-0002I0-07; Mon, 25 Jan 2010 11:56:48 -0500 Received: from localhost ([127.0.0.1] helo=ntdws12.chass.utoronto.ca ident=505) by ntdws12.chass.utoronto.ca with esmtp (Exim 4.63) (envelope-from ) id 1NZSF5-0007xt-To; Mon, 25 Jan 2010 11:56:47 -0500 Received: (from bwalton@localhost) by ntdws12.chass.utoronto.ca (8.13.8/8.13.8/Submit) id o0PGulPn030617; Mon, 25 Jan 2010 11:56:47 -0500 From: Ben Walton To: sup-devel@rubyforge.org Date: Mon, 25 Jan 2010 11:56:40 -0500 Message-Id: <1264438600-30566-1-git-send-email-bwalton@artsci.utoronto.ca> X-Mailer: git-send-email 1.6.6 In-Reply-To: <1264436321.23.0.59454690461.issue50@masanjin.net> References: <1264436321.23.0.59454690461.issue50@masanjin.net> Subject: [sup-devel] [PATCH] Conditionally define Fixnum#ord 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 Ruby 1.8.5 was throwing exceptions from lib/sup/util.rb line 650 due to calling .ord on a Fixnum. This patch defines Fixnum#ord if the method doesn't exist already. Helps on old ruby version (1.8.5 here). Signed-off-by: Ben Walton --- lib/sup/util.rb | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/lib/sup/util.rb b/lib/sup/util.rb index 5dadba1..861db7f 100644 --- a/lib/sup/util.rb +++ b/lib/sup/util.rb @@ -366,6 +366,12 @@ class Fixnum end end + unless method_defined?(:ord) + def ord + self + end + end + ## hacking the english language def pluralize s to_s + " " + -- 1.6.6 _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel