X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fmath.rb;h=9dd35c985fabdb2f53be5e942b1a4644aab6a4f5;hb=070488d789dcfdf4938d56b0b3f7bcd36dcc54b3;hp=f54733b33c0435e3e6a0d2ebd32a5e70f422b407;hpb=e7c109b7f575d4c9e14ce1b523697a943320d7bd;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/math.rb b/data/rbot/plugins/math.rb index f54733b3..9dd35c98 100644 --- a/data/rbot/plugins/math.rb +++ b/data/rbot/plugins/math.rb @@ -110,9 +110,9 @@ class MathPlugin < Plugin answer = "a number with >30 digits..." end end - m.reply answer + m.reply answer.to_s rescue Exception => e - error "couldn't evaluate expression \"#{m.params}\": #{e.inspect}" + error e m.reply "illegal expression \"#{m.params}\"" return end