Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: Ben Walton <bwalton@artsci.utoronto.ca>
To: sup-talk <sup-talk@rubyforge.org>
Subject: Re: [sup-talk] sup exception
Date: Wed, 09 Jun 2010 22:42:12 -0400	[thread overview]
Message-ID: <1276137615-sup-4328@pinkfloyd.chass.utoronto.ca> (raw)
In-Reply-To: <1276135857-sup-1888@zyrg.net>

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

Excerpts from Rich Lane's message of Wed Jun 09 22:15:07 -0400 2010:
> Try it now.

I needed the following patch to run (old 1.8 here; no
Symbol#to_proc).

/me goes back to building xapian for ruby 1.9.1 on rhel5.

Thanks
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302


[-- Attachment #2: 0001-symbol-to-proc.patch --]
[-- Type: application/octet-stream, Size: 853 bytes --]

From 8f9cd7e38b532366e6caed6e1f790d3265bbbb90 Mon Sep 17 00:00:00 2001
From: Ben Walton <bwalton@artsci.utoronto.ca>
Date: Wed, 9 Jun 2010 22:27:44 -0400
Subject: [PATCH] Conditionally add Symbol#to_proc

Add a utility monkey-patch for versions of ruby that don't have the
to_proc method for Symbols.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
---
 lib/sup/util.rb |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/lib/sup/util.rb b/lib/sup/util.rb
index 38c4eb2..27574c5 100644
--- a/lib/sup/util.rb
+++ b/lib/sup/util.rb
@@ -6,6 +6,14 @@ require 'set'
 require 'enumerator'
 
 ## time for some monkeypatching!
+class Symbol
+  unless method_defined? :to_proc
+    def to_proc
+      proc {  |obj, *args| obj.send(self, *args) }
+    end
+  end
+end
+
 class Lockfile
   def gen_lock_id
     Hash[
-- 
1.7.0


[-- Attachment #3: Type: text/plain, Size: 140 bytes --]

_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk

  reply	other threads:[~2010-06-10  2:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20  1:08 Brian May
2010-06-10  0:39 ` Brian May
2010-06-10  1:44   ` Rich Lane
2010-06-10  2:00     ` Brian May
2010-06-10  2:15       ` Rich Lane
2010-06-10  2:42         ` Ben Walton [this message]
2010-07-03 13:35           ` Ben Walton
2010-07-13  2:05           ` Rich Lane
2010-06-10  2:47         ` Brian May

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1276137615-sup-4328@pinkfloyd.chass.utoronto.ca \
    --to=bwalton@artsci.utoronto.ca \
    --cc=sup-talk@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox