From f4c8a4774232728523310d052603aa759d1f9cd0 Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Sat, 7 Sep 2013 20:19:42 +0200 Subject: [PATCH] Use better const name And fix some minor style issues. --- lib/mutant/zombifier.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/mutant/zombifier.rb b/lib/mutant/zombifier.rb index e07b551d..c8dd1524 100644 --- a/lib/mutant/zombifier.rb +++ b/lib/mutant/zombifier.rb @@ -11,7 +11,7 @@ module Mutant # * Toplevel reference/cbase nodes in code (rspec) # * Creates useless toplevel modules that get vendored under ::Zombie (set) # - STOP = %w( + IGNORE = %w( set rspec diff/lcs @@ -31,6 +31,7 @@ module Mutant # def self.zombify run('mutant') + self end # Zombify gem @@ -43,6 +44,7 @@ module Mutant # def self.run(name) Gem.new(name).zombify + self end # Zombifier subject, compatible with mutants loader @@ -68,7 +70,7 @@ module Mutant # @api private # def zombify - $stderr.puts "Zombifying #{context.source_path}" + $stderr.puts("Zombifying #{context.source_path}") Loader::Eval.run(zombified_root, self) self end @@ -109,6 +111,7 @@ module Mutant end self end + memoize :zombify # Find file # @@ -123,7 +126,7 @@ module Mutant # @api private # def self.find(logical_name) - return if STOP.include?(logical_name) + return if IGNORE.include?(logical_name) CACHE.fetch(logical_name) do CACHE[logical_name] = find_uncached(logical_name) end