From c44d4f37b8952c69bedd7bee1fcda448424ee41b Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 25 Aug 2006 23:31:47 +0000 Subject: Fix stupid bug in the new message mapping --- lib/rbot/messagemapper.rb | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'lib/rbot') diff --git a/lib/rbot/messagemapper.rb b/lib/rbot/messagemapper.rb index bb193cbf..fd8c7e7d 100644 --- a/lib/rbot/messagemapper.rb +++ b/lib/rbot/messagemapper.rb @@ -329,19 +329,15 @@ module Irc case default when String value.instance_variable_set(:@string_value, default) - def value.to_s - @string_value - end else - def value.to_s - value.join(' ') - end + value.instance_variable_set(:@string_value, value.join(' ')) end else value = matching[i].split - def value.to_s - matching[i] - end + value.instance_variable_set(:@string_value, matching[i]) + end + def value.to_s + @string_value end options[item] = value debug "set #{item} to #{value.inspect}" -- cgit v1.2.3