aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2008-11-14 07:10:38 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2008-11-14 07:10:38 +0000
commiteba45fc08f1baa8a7cbf37f9bcc878d41c9402e7 (patch)
tree48bb992d37630ecf24922d93abd4e13b1854c8c3
parentAllow + in package names. (diff)
downloadrbot-gentoo-eba45fc08f1baa8a7cbf37f9bcc878d41c9402e7.tar.gz
rbot-gentoo-eba45fc08f1baa8a7cbf37f9bcc878d41c9402e7.tar.bz2
rbot-gentoo-eba45fc08f1baa8a7cbf37f9bcc878d41c9402e7.zip
Escape regex metachars.
-rw-r--r--gentoo-data.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/gentoo-data.rb b/gentoo-data.rb
index beba071..31c5b6b 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -244,6 +244,7 @@ class GentooPlugin < Plugin
begin
pkgindex = get_pkgindex(m)
+ pn = pn.gsub('+','\\\+')
rx = (pn =~ /\//) ? /^#{pn}$/ : /\/#{pn}$/
packages = pkgindex.keys.grep(rx)