]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
ruby 2.2: fix a obscure regexp escaping bug
authorMatthias H <apoc@sixserv.org>
Mon, 9 Mar 2015 08:24:26 +0000 (09:24 +0100)
committerMatthias H <apoc@sixserv.org>
Mon, 9 Mar 2015 08:24:26 +0000 (09:24 +0100)
lib/rbot/irc.rb

index c57b252f58973801f7f5b8a6e234a56903c1185e..81f91210425f2e3f76dc2fb47c374bb60079184f 100644 (file)
@@ -546,7 +546,7 @@ class Regexp
     RFC_CHAN = /#{CHAN_FIRST}#{CHAN_ANY}{1,49}|#{CHAN_SAFE}#{CHAN_ANY}{1,44}/
 
     # Nick-matching regexps
-    SPECIAL_CHAR = /[\x5b-\x60\x7b-\x7d]/
+    SPECIAL_CHAR = /[\[-\`\{-\}]/
     NICK_FIRST = /#{SPECIAL_CHAR}|[[:alpha:]]/
     NICK_ANY = /#{SPECIAL_CHAR}|[[:alnum:]]|-/
     GEN_NICK = /#{NICK_FIRST}#{NICK_ANY}+/