summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-08-03 10:03:06 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-08-03 10:03:06 +0200
commita915f365139217ba985603181a7c7ceda3f1d9c6 (patch)
treeca71a25c06bb87c0c0103320734c9d4b020bbf05 /lib
parentfd168425f0da4527204fd8a97f45b39db34c122f (diff)
* fix ominous bug in Regexp::IP_ADDR
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/irc.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rbot/irc.rb b/lib/rbot/irc.rb
index 58e9f90a..1e1c56b0 100644
--- a/lib/rbot/irc.rb
+++ b/lib/rbot/irc.rb
@@ -493,8 +493,8 @@ class Regexp
HEX_DIGITS = /#{HEX_DIGIT}+/
HEX_OCTET = /#{HEX_DIGIT}#{HEX_DIGIT}?/
DEC_OCTET = /[01]?\d?\d|2[0-4]\d|25[0-5]/
- DEC_IP_ADDR = /#{DEC_OCTET}.#{DEC_OCTET}.#{DEC_OCTET}.#{DEC_OCTET}/
- HEX_IP_ADDR = /#{HEX_OCTET}.#{HEX_OCTET}.#{HEX_OCTET}.#{HEX_OCTET}/
+ DEC_IP_ADDR = /#{DEC_OCTET}\.#{DEC_OCTET}\.#{DEC_OCTET}\.#{DEC_OCTET}/
+ HEX_IP_ADDR = /#{HEX_OCTET}\.#{HEX_OCTET}\.#{HEX_OCTET}\.#{HEX_OCTET}/
IP_ADDR = /#{DEC_IP_ADDR}|#{HEX_IP_ADDR}/
# IPv6, from Resolv::IPv6, without the \A..\z anchors