From: Giuseppe Bilotta Date: Wed, 18 Jun 2008 16:18:05 +0000 (+0200) Subject: rfc2812: be compatible with ruby < 1.8.7 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=bded1f0382aeb691aa33ca312eea7f068dbcde99;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git rfc2812: be compatible with ruby < 1.8.7 String#each_char is only available in ruby 1.8.7, so use each_byte followed by .chr --- diff --git a/lib/rbot/rfc2812.rb b/lib/rbot/rfc2812.rb index 819ea291..f4487bdb 100644 --- a/lib/rbot/rfc2812.rb +++ b/lib/rbot/rfc2812.rb @@ -1462,8 +1462,8 @@ module Irc else debug @server.supports[:chanmodes] setting = :set - arg.each_char do |c| - m = c.intern + arg.each_byte do |c| + m = c.chr.intern case m when :+ setting = :set