Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* [sup-devel] [issue50] 0.10 error in ask_yes_or_no
@ 2010-01-25 16:18 Scott Henson
  2010-01-25 16:56 ` [sup-devel] [PATCH] Conditionally define Fixnum#ord Ben Walton
  0 siblings, 1 reply; 3+ messages in thread
From: Scott Henson @ 2010-01-25 16:18 UTC (permalink / raw)
  To: sup-devel


New submission from Scott Henson <scott@foolishpride.org>:

[Mon Jan 25 11:06:26 -0500 2010] ERROR: oh crap, an exception
----------------------------------------------------------------
I'm very sorry. It seems that an error occurred in Sup. Please
accept my sincere apologies. Please submit the contents of
/home/shenson/.sup/exception-log.txt and a brief report of the
circumstances to http://masanjin.net/sup-bugs/ so that I might
address this problem. Thank you!

Sincerely,
William
----------------------------------------------------------------
--- NoMethodError from thread: main
undefined method `ord' for 121:Fixnum
/usr/lib/ruby/gems/1.8/gems/sup-0.10.1/lib/sup/buffer.rb:648:in `ask_yes_or_no'
/usr/lib/ruby/gems/1.8/gems/sup-0.10.1/lib/sup/util.rb:553:in `send'
/usr/lib/ruby/gems/1.8/gems/sup-0.10.1/lib/sup/util.rb:553:in `method_missing'
/usr/lib/ruby/gems/1.8/gems/sup-0.10.1/lib/sup/modes/thread-view-mode.rb:232:in
`bounce'
/usr/lib/ruby/gems/1.8/gems/sup-0.10.1/lib/sup/mode.rb:51:in `send'
/usr/lib/ruby/gems/1.8/gems/sup-0.10.1/lib/sup/mode.rb:51:in `handle_input'
/usr/lib/ruby/gems/1.8/gems/sup-0.10.1/lib/sup/buffer.rb:270:in `handle_input'
/usr/lib/ruby/gems/1.8/gems/sup-0.10.1/bin/sup:270
/usr/bin/sup:19:in `load'
/usr/bin/sup:19

shenson@junkyard ~$ cat /etc/redhat-release 
Fedora release 12 (Constantine)
shenson@junkyard ~$ ruby --version
ruby 1.8.6 (2009-08-04 patchlevel 383) [x86_64-linux]

I was bouncing a message to another address and it caused the above error after
I hit 'y'.

----------
messages: 120
nosy: shenson
priority: bug
ruby_version: ruby 1.8.6 (2009-08-04 patchlevel 383) [x86_64-linux]
status: unread
sup_version: 0.10
title: 0.10 error in ask_yes_or_no

_________________________________________
Sup issue tracker <sup-bugs@masanjin.net>
<http://masanjin.net/sup-bugs/issue50>
_________________________________________
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [sup-devel] [PATCH] Conditionally define Fixnum#ord
  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
  2010-01-26 14:05   ` William Morgan
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Walton @ 2010-01-25 16:56 UTC (permalink / raw)
  To: sup-devel

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [sup-devel] [PATCH] Conditionally define Fixnum#ord
  2010-01-25 16:56 ` [sup-devel] [PATCH] Conditionally define Fixnum#ord Ben Walton
@ 2010-01-26 14:05   ` William Morgan
  0 siblings, 0 replies; 3+ messages in thread
From: William Morgan @ 2010-01-26 14:05 UTC (permalink / raw)
  To: sup-devel

Reformatted excerpts from Ben Walton's message of 2010-01-25:
> 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).

Applied to master. Thanks!
-- 
William <wmorgan-sup@masanjin.net>
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-26 14:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-25 16:18 [sup-devel] [issue50] 0.10 error in ask_yes_or_no Scott Henson
2010-01-25 16:56 ` [sup-devel] [PATCH] Conditionally define Fixnum#ord Ben Walton
2010-01-26 14:05   ` William Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox