diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-04-09 23:31:59 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-04-09 23:31:59 +0200 |
commit | 282909e0ef97ab3045254920dcee5eab2be25505 (patch) | |
tree | 3d907c3c12c6333e81662d4db070cab3b69e5c97 | |
parent | d6f297d8f6bff4f33917441355a3e2ff4a0550fe (diff) |
math plugin: stringify answer for reply
Some Ruby versions seem to have a problem when answer is a Fixnum, so
make the .to_s conversion explicit
-rw-r--r-- | data/rbot/plugins/math.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/data/rbot/plugins/math.rb b/data/rbot/plugins/math.rb index dde4e954..9dd35c98 100644 --- a/data/rbot/plugins/math.rb +++ b/data/rbot/plugins/math.rb @@ -110,7 +110,7 @@ class MathPlugin < Plugin answer = "a number with >30 digits..." end end - m.reply answer + m.reply answer.to_s rescue Exception => e error e m.reply "illegal expression \"#{m.params}\"" |