diff options
author | 2008-11-14 07:10:38 +0000 | |
---|---|---|
committer | 2008-11-14 07:10:38 +0000 | |
commit | eba45fc08f1baa8a7cbf37f9bcc878d41c9402e7 (patch) | |
tree | 48bb992d37630ecf24922d93abd4e13b1854c8c3 | |
parent | Allow + in package names. (diff) | |
download | rbot-gentoo-eba45fc08f1baa8a7cbf37f9bcc878d41c9402e7.tar.gz rbot-gentoo-eba45fc08f1baa8a7cbf37f9bcc878d41c9402e7.tar.bz2 rbot-gentoo-eba45fc08f1baa8a7cbf37f9bcc878d41c9402e7.zip |
Escape regex metachars.
-rw-r--r-- | gentoo-data.rb | 1 |
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) |