diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2006-08-31 15:12:02 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2006-08-31 15:12:02 +0000 |
commit | d0292d598d771297adedf8d823d8a8ee408a8044 (patch) | |
tree | 06c70c30ab1042c665433640c4cc374a0b0c189c /lib/rbot | |
parent | f941450468f6d55272a18e037527f662a9e5eb82 (diff) |
Improve debugging output in messagemapper
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/messagemapper.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rbot/messagemapper.rb b/lib/rbot/messagemapper.rb index e899770a..5e1e01a8 100644 --- a/lib/rbot/messagemapper.rb +++ b/lib/rbot/messagemapper.rb @@ -305,8 +305,9 @@ module Irc return nil, "#{m.message.inspect} doesn't match #{@dyn_items.first.inspect} (#{@regexp})" unless matching return nil, "#{m.message.inspect} only matches #{@dyn_items.first.inspect} (#{@regexp}) partially" unless matching[0] == m.message - debug "#{m.message.inspect} matched #{@regexp} with #{matching[1..-1].join(', ')}" - debug "Associating #{matching[1..-1].join(', ')} with dyn items #{@dyn_items[1..-1].join(', ')}" + debug_match = matching[1..-1].collect{ |m| m.inspect}.join(', ') + debug "#{m.message.inspect} matched #{@regexp} with #{debug_match}" + debug "Associating #{debug_match} with dyn items #{@dyn_items[1..-1].join(', ')}" (@dyn_items.length - 1).downto 1 do |i| it = @dyn_items[i] |