From 9306780e41b8e16ad111376a0baba58545634557 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 1 May 2008 00:24:22 +0200 Subject: messagemapper.rb: keep options when removing captures in regexps --- lib/rbot/messagemapper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/rbot/messagemapper.rb b/lib/rbot/messagemapper.rb index 87bdd01f..40c4e51f 100644 --- a/lib/rbot/messagemapper.rb +++ b/lib/rbot/messagemapper.rb @@ -13,7 +13,7 @@ class Regexp new = self.source.gsub(/(^|[^\\])((?:\\\\)*)\(([^?])/) { "%s%s(?:%s" % [$1, $2, $3] } - Regexp.new(new) + Regexp.new(new, self.options) end end -- cgit v1.2.3