From a52e2615f2ac7bbf96501951c1f5604e642fe1ea Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Wed, 17 Sep 2014 00:49:39 +0000 Subject: [PATCH] Remove dead code * The SCOPE_PATERN constraints `namespace` to be characters that are valid literal static regexp. * Not test case can be created that forces Regexp.escape here. --- lib/mutant/expression/namespace.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/mutant/expression/namespace.rb b/lib/mutant/expression/namespace.rb index 63c3bab8..a79ee839 100644 --- a/lib/mutant/expression/namespace.rb +++ b/lib/mutant/expression/namespace.rb @@ -28,11 +28,10 @@ module Mutant # @api private def initialize(*) super - namespace_src = Regexp.escape(namespace) @recursion_pattern = Regexp.union( - /\A#{namespace_src}\z/, - /\A#{namespace_src}::/, - /\A#{namespace_src}[.#]/ + /\A#{namespace}\z/, + /\A#{namespace}::/, + /\A#{namespace}[.#]/ ) end