lib/contrast/agent/assess/rule/redos.rb in contrast-agent-3.11.0 vs lib/contrast/agent/assess/rule/redos.rb in contrast-agent-3.12.0
- old
+ new
@@ -52,10 +52,9 @@
# Nota bene about Regexp#to_s: it doesn't necessarily give you the original Regexp back
# (in the sense of `my_str == Regexp.new(my_str).to_s`), it gives you a Regexp that
# will have the same functional characteristics as the original.
# Regexp#inspect gives you a "more nicely formatted" version than #to_s.
# Regexp#source will give you the original source.
- # TODO RUBY-683, would we ever get a hit on one but not the other?
# Use #match? because it doesn't fill out global variables
# in the way match or =~ do.
VULNERABLE_PATTERN.match? regexp.source
end