Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (13 sloc) 235 Bytes
class Regexp
def disable_capture
re = ''
self.source.scan(/\\.|[^\\\(]+|\(\?|\(/m) {|s|
if s == '('
re << '(?:'
else
re << s
end
}
Regexp.new(re, self.options, self.kcode)
end
end