From: Ben Walton <bwalton@artsci.utoronto.ca>
To: sup-devel@rubyforge.org
Subject: [sup-devel] [PATCH] Conditionally define Fixnum#ord
Date: Mon, 25 Jan 2010 11:56:40 -0500 [thread overview]
Message-ID: <1264438600-30566-1-git-send-email-bwalton@artsci.utoronto.ca> (raw)
In-Reply-To: <1264436321.23.0.59454690461.issue50@masanjin.net>
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 <bwalton@artsci.utoronto.ca>
---
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
next prev parent reply other threads:[~2010-01-25 16:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-25 16:18 [sup-devel] [issue50] 0.10 error in ask_yes_or_no Scott Henson
2010-01-25 16:56 ` Ben Walton [this message]
2010-01-26 14:05 ` [sup-devel] [PATCH] Conditionally define Fixnum#ord William Morgan
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=1264438600-30566-1-git-send-email-bwalton@artsci.utoronto.ca \
--to=bwalton@artsci.utoronto.ca \
--cc=sup-devel@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