]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
rfc2812: be compatible with ruby < 1.8.7
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 18 Jun 2008 16:18:05 +0000 (18:18 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 18 Jun 2008 16:18:05 +0000 (18:18 +0200)
String#each_char is only available in ruby 1.8.7, so use each_byte
followed by .chr

lib/rbot/rfc2812.rb

index 819ea29152f0790329939e41c8490cf206dd20c6..f4487bdb8eaf5576454c8f4af2828c7e79013546 100644 (file)
@@ -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