lib/ircp/message.rb in ircp-1.1.0 vs lib/ircp/message.rb in ircp-1.1.1

- old
+ new

@@ -16,11 +16,11 @@ variables = instance_variables.map { |name| "#{name.inspect}=#{instance_variable_get(name).inspect}" } variables.unshift "#{self.class}" "<#{variables.join ' '}>" end - def to_s + def to_irc if @raw.nil? || @raw.empty? tokens = [] tokens << @prefix tokens << @command @params.each { |param| tokens << param } @@ -30,7 +30,8 @@ end msg << "\r\n" unless msg.end_with?("\r\n") msg end + alias_method :to_s, :to_irc end end