]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
Tuning of messagemapper debug output
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 4 Feb 2007 15:33:26 +0000 (15:33 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 4 Feb 2007 15:33:26 +0000 (15:33 +0000)
lib/rbot/messagemapper.rb

index 144669d88445d7a2142e59e27062007178cba143..396928686c65ac588ccf15ca52db4a25ff2ed831 100644 (file)
@@ -455,7 +455,7 @@ module Irc
 
       matching = @regexp.match(m.message)
       return nil, "#{m.message.inspect} doesn't match #{@template} (#{@regexp})" unless matching
-      return nil, "#{m.message.inspect} only matches #{@template} (#{@regexp}) partially" unless matching[0] == m.message
+      return nil, "#{m.message.inspect} only matches #{@template} (#{@regexp}) partially: #{matching[0].inspect}" unless matching[0] == m.message
 
       debug_match = matching[1..-1].collect{ |d| d.inspect}.join(', ')
       debug "#{m.message.inspect} matched #{@regexp} with #{debug_match}"