From 282909e0ef97ab3045254920dcee5eab2be25505 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 9 Apr 2008 23:31:59 +0200 Subject: 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 --- data/rbot/plugins/math.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data/rbot') 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}\"" -- cgit v1.2.3